Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion How to monitor upload progress?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
abe oppenheim  
View profile  
 More options Dec 15 2009, 1:41 pm
From: abe oppenheim <abe.oppenh...@gmail.com>
Date: Tue, 15 Dec 2009 13:41:05 -0500
Local: Tues, Dec 15 2009 1:41 pm
Subject: Re: [Google Documents List API] Re: How to monitor upload progress?

There is no way to "cut off the request" through the api?  My app could try
to kill the thread processing the request, but that seems unpredictable.

On Tue, Dec 15, 2009 at 1:33 PM, Eric Bidelman <api.e...@google.com> wrote:
> I suppose you (or your app) could cut off the request before
> the upload is complete (eg. before an entry is returned
> by the server).

> On Tue, Dec 15, 2009 at 10:32 AM, abe oppenheim <abe.oppenh...@gmail.com>wrote:

>> Thank you Eric.  Would you also say there is no way to programmatically
>> cancel an upload?

>> On Tue, Dec 15, 2009 at 1:12 PM, Eric Bidelman <api.e...@google.com>wrote:

>>> Hi all,

>>> The current upload path (we'll call it normal upload) sends
>>> a file over the wire in its entirety. There's no way for you
>>> to ping the server to request the upload's progress.

>>> This is something a resumable upload feature would take care
>>> of, which is something we're looking into for next quarter.

>>> Eric

>>> On Tue, Dec 15, 2009 at 8:16 AM, abe oppenheim <abe.oppenh...@gmail.com>wrote:

>>>> Thank You, I was able to implement this to monitor the number of bytes
>>>> read.  However, it appears that the whole stream is in fact read into a very
>>>> large memory buffer.  I'm not sure how large, but large enough that when I
>>>> monitored the progress of the inputStream for a 30mb file, the entire input
>>>> stream was read in a few seconds.  With this in mind, is there anyway I can
>>>> monitor the upload of a file? Or, more importantly, cancel the upload upon
>>>> user input?

>>>> On Tue, Dec 15, 2009 at 5:01 AM, Bobby <bobbysoa...@gmail.com> wrote:

>>>>> I think you may be able to implement this by using the
>>>>> MediaStreamSource class for uploading document contents:

>>>>> http://code.google.com/apis/gdata/javadoc/com/google/gdata/data/media...

>>>>> The constructor for MediaStreamSource takes in an InputStream so for
>>>>> example, suppose you create a class, MonitoredInputStream, that
>>>>> extends InputStream and overrides the read methods to keep track of
>>>>> how many bytes have been read, then, since it's unlikely that the
>>>>> GData library reads the whole stream into memory (and rather just
>>>>> keeps a small buffer) this should give you a good idea of how many
>>>>> bytes have been uploaded, which you can make available to your
>>>>> progress bar control.

>>>>> I haven't implemented this, but it sounds like it would work.

>>>>> Bobby

>>>>> On Dec 14, 9:10 pm, abe oppenheim <abe.oppenh...@gmail.com> wrote:
>>>>> > well, i want to monitor the progress of a document upload from my
>>>>> java code.
>>>>> >  so that i could do things like display a progress dialog. or cancel
>>>>> an
>>>>> > upload.

>>>>> > On Mon, Dec 14, 2009 at 9:09 PM, brian karlo gutierrez
>>>>> > <brikz...@yahoo.com>wrote:

>>>>> > > General monitoring of network connections, better use wireshark.
>>>>> That
>>>>> > > really helps me a lot in determining if I really send the correct
>>>>> http
>>>>> > > request to the google server.

>>>>> > > - Brian

>>>>> > > --- On *Tue, 12/15/09, javadev <abe.oppenh...@gmail.com>* wrote:

>>>>> > > From: javadev <abe.oppenheim@gmail..com>
>>>>> > > Subject: [Google Documents List API] How to monitor upload
>>>>> progress?
>>>>> > > To: "Google Documents List API" <
>>>>> > > google-documents-list-api@googlegroups.com>
>>>>> > > Date: Tuesday, December 15, 2009, 6:18 AM

>>>>> > > I am using this java code to upload files:

>>>>> > > String destFolderStr = "
>>>>> http://docs.google.com/feeds/default/private/
>>>>> > > full/";
>>>>> > > String mimeType =
>>>>> DocumentListEntry.MediaType.fromFileName(file.getName
>>>>> > > ()).getMimeType();

>>>>> > > DocumentListEntry newDocument = new DocumentListEntry();
>>>>> > > newDocument.setFile(new File(file.getPath()), mimeType);
>>>>> > > newDocument.setTitle(new PlainTextConstruct(file.getName()));

>>>>> > > DocumentListEntry newEntry = (DocumentListEntry)
>>>>> m_Service.insert(new
>>>>> > > URL(destFolderStr), newDocument);

>>>>> > > Is there any way that I can monitor the reading of the byte stream
>>>>> > > such that I can monitor the progress of the upload?  I assume this
>>>>> > > would require extending and re-implementing the "insert" method
>>>>> from
>>>>> > > the gdata library?  Any chance some sort of example for doing is
>>>>> this
>>>>> > > is available?

>>>>> > > Thank You


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.