This project has moved. For the latest updates, please go here.

Can I upload pic by url directly?

Topics: Developer Forum
Aug 14, 2010 at 6:17 PM

Can I use Flickr.UploadPicture("http://myurl");??

If not, please tell me how to do it work.

ps. I used GetResponseStream() method read to bytes[].

- convert back to MemoryStream

- and pass MemoryStream to Flickr.UploadPicture

but it's show "FlickrNet.FlickrApiException: Filetype was not recognised (5)".

Aug 16, 2010 at 7:54 AM
Why convert the stream returned by GetResponseStream into bytes and
then back into a stream - just pass it straight to UploadPicture.

Stream s = response.GetResponseStream();

string photoId = flickr.UploadPicture(s, "image.jpg", "Title",
"Description", ....);

As for the Filetype not recognised - what are you trying to upload,
and what did you pass as the filename?

Aug 16, 2010 at 8:39 PM

becuase GetResponseStream can't Seek.

Aug 17, 2010 at 10:09 AM
Good point.

I'll consider changing the code so it works on a none-seekable stream.

As for the original error - what type of file are you trying to upload? Is it a video or a photo?

Aug 17, 2010 at 11:00 AM

when i used GetResponseStream(), it shows "System.NotSupportedException: This stream does not support seek operations."

Please show me your code.

My upload file is a photo.


Thank you.


Aug 17, 2010 at 11:28 AM
Are you resetting the position on the MemoryStream to zero before uploading?

What type of photo are you trying to upload? JPG, PNG, TIFF, BMP?
Sep 15, 2010 at 3:40 PM
The latest version will not work with non-seekable streams. Hope this helps.