Downloading file. WebClient seek issue with Stream...

Topics: User Forum
Nov 15, 2010 at 7:25 PM

I am trying to download photos based on the user selection.

Based on your comment (http://flickrnet.codeplex.com/Thread/View.aspx?ThreadId=207228), it looks like this functionality was removed from flickrnet.  So I tried doing the downloading myself. However, when I use System.Net.WebClient or System.Net.WebRequest to get the file stream, I keep getting errors saying that "This stream does not support seek operations".

From a recent discussion (http://flickrnet.codeplex.com/Thread/View.aspx?ThreadId=223584), it appears someone else had this similar problem and you might have fixed the issue (http://flickrnet.codeplex.com/SourceControl/changeset/changes/75724). But I cannot tell if this fix is only for Uploads.

 - Andy

Coordinator
Nov 15, 2010 at 7:58 PM

As you are using WebClient to do the download, and this is a core .Net class and nothing to do with the Flickr API I'm not sure what your issue is.

If you are getting that error then you have something in your code that must be doing a seek (or trying to set the position) of the stream returned by the WebClient.

Perhaps you could actually show us your code?

Sam

Nov 15, 2010 at 8:12 PM

I guess I was naively hoping this functionality had been put back in place.  But upon re-reading the changeset logs, it looks like the seek issue was only for the uploads and not the downloads.

Coordinator
Nov 15, 2010 at 8:58 PM

Correct - as it was pointed out in the first post you linked to, the library does not do downloading anymore.

Feel free to post your code though and I will try to help.

Sam