[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Option #6: Using POST for uploading associated resources





Cons:

o It's not as full featured as WebDAV; it solves only the uploading problem; it doesn't allow for full control of a namespace by the client (but that might be a pro for the server side...)
o Doesn't solve the binary-content-in-XML problem at all (not a goal of this solution)
o Requires URL rewriting by the client
o If user really just wants to upload a picture with a little metadata, requires two uploads: this one, plus an Atom entry with some sort of "no, look over here!" link inside.

So, in order to upload, say three images I just took, and an entry, I need to do seven transactions?


1) upload image #1
2) upload metadata for image #1
3) upload image #2
4) upload metadata for image #2
5) upload image #3
6) upload metadata for image #3
7) Combine results from steps 1-6, rewrite URLs in the entry, then upload entry.


By the same logic, we would need (8) - upload metadata for the entry :)

What if there was just a simple way to upload the metadata for the binary objects, and the entry would still be separate? Use just MIME multipart to upload the image (essentially combining 1&2, 3&4, and 5&6). That would be somewhere half-way between the suggested "put everything in a single, gigantic multipart message" and the Option #6. That would also mean that there would be no need for the server to do any URL rewriting, as the entry would still be separate.

o Authentication for upload would have to be HTTP-based (Basic or Digest auth?) rather than something more XML-based, unless I'm missing something.

WSSE should work well here.


/Janne