Advertisement
Guest User

Untitled

a guest
Mar 21st, 2012
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.85 KB | None | 0 0
  1. //FORM THE API
  2.  
  3. photo - Requires either source or data, but not both. If both are specified, source is used.
  4. source - The URL of the photo to copy. This must be a web-accessible URL, not a local file or intranet location.
  5. data - An image file. See File uploads below.
  6. caption (optional, HTML allowed)
  7. click-through-url (optional)
  8.  
  9. //WHAT I HAVE
  10.  
  11.            var data = new NameValueCollection
  12.                 {
  13.                     { "email", usernameBox.Text },
  14.                     { "password", passwordBox.Text },
  15.                     { "type", "photo" },
  16.                     { "data", tempImage }
  17.                 };
  18.  
  19. //USING THIS
  20.  
  21.             FileStream tempImage = new FileStream(@currentItemDir, FileMode.Open);
  22.  
  23. and
  24.  
  25.             Image tempImage = Image.FromFile(currentItemDir);
  26.  
  27. where
  28.  
  29.         string currentItemDir = FolderName + selectedItem;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement