Ebeo / google-gdata

Automatically exported from code.google.com/p/google-gdata
0 stars 0 forks source link

Resuming Upload Error(ResumableUpload) #368

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Upload a file using ResumableUpload Component.
2. There will be an error stating that: Request was aborted.
3. So, now we resume the upload, using ResumeAsync and passing in the
parameters.

What is the expected output? What do you see instead?
Expected: Uploading to resume from where it left of.
Error:    Upload starts all over again.

What version of the product are you using? On what operating system?
C#, Visual Studio 2008

Please provide any additional information below.
I am using the following code:

MediaFileSource mfs = new MediaFileSource("C:\\video.flv", "video/x-flv");

Stream s = mfs.Data;

s.Seek(Position, SeekOrigin.Begin);

ru.ResumeAsync(this.Auth, new Uri(ResumeUri), HttpMethod, s, "video/x-flv",
Upload); 
//Upload is a listviewitem.

Original issue reported on code.google.com by pathachiever11 on 9 Apr 2010 at 10:36

GoogleCodeExporter commented 9 years ago
By the way, I am trying to upload a flv video to YouTube.

Original comment by pathachiever11 on 9 Apr 2010 at 2:56

GoogleCodeExporter commented 9 years ago
hard to reproduce with the details given.

That an upload starts from the beginning again might be due to the fact that the
upload was cancelled during it's first chunk? In that case you start at 0 (we 
can
only resume at chunk boundaries).

To resume from a certain position you need to seek your stream to the position 
where
you want to resume from. Did you look at the YoutubeContentUploader sample?

Original comment by fman...@gmail.com on 26 Apr 2010 at 2:15

GoogleCodeExporter commented 9 years ago

Original comment by fman...@gmail.com on 26 Apr 2010 at 2:16

GoogleCodeExporter commented 9 years ago
Yes.  The sample was helpful and I was able to get it to work.  It is very 
efficient and fast!

Thanks!

Original comment by pathachiever11 on 26 Apr 2010 at 7:04

GoogleCodeExporter commented 9 years ago
Glad to be of help

Original comment by fman...@gmail.com on 6 May 2010 at 2:34