> To ask a dumb question, as someone who hasn't used chunked uploading
 before: how can I indicate to the server the order in which to glue
 the chunks back together? (Tell me to go away and ask a Java forum if
 you want.)

If you're designing your own protocol, you do it however you want.
You'll need some sort of identifier to indicate that all these PUT
operations are part of the same upload. So, for example, you could send
a final GET request to indicate "we're done uploading" for that identifier.

i tried using chunked uploads some time ago and ran into all kinds of problems with common web servers. some servers regarded each chunk as a separate request, others required a content-length for the upload (despite the fact that chunked by definition is for content whose length you don't necessarily know at upload time), etc etc. at least a year or so ago, madness lay within chunkedness.

 > what about streaming it with InputStreamEntity?

 ideally you'd never have those 2mb cached at one time.

If HttpClient supports streamed HTTP PUT operations, you're right --
this might allow an upload in one step, without chunking. That's
definitely worth a shot and is a great idea!

i use HttpPut happily with setEntity(StringEntity). if it doesn't work with setEntity(InputStreamEntity), it's a bug IMHO.

InputStreamEntity is the way to go with this, again IMHO.

--
jason.vp.engineering.particle

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to