parted icon indicating copy to clipboard operation
parted copied to clipboard

Parting Multipart, but not all JSON

Open indexzero opened this issue 12 years ago • 1 comments

@chjj I've wanted to implement this in nodejitsu for a while, but haven't found a reliable multipart implementation to use:

  • Currently a user has to call PUT application/json apps/:user/:app to update the app document and then do PUT application/x-tar-gz apps/:user/:app/snapshot/:version to add the tarball.
  • Would be nice if we could just PUT multipart apps/:user/:app/snapshot/:version with both the app document updates and the tarball

Is this possible in parted?

indexzero avatar Feb 13 '13 02:02 indexzero

Yeah. Definitely possible with parted, or any multipart parser really.

One thing to consider though: since we're not really using that API in the browser at all, it might not be worth the overhead of parsing everything. A raw file in the request body of a PUT will always be faster than parsing multipart, but then again it is one less request.

chjj avatar Feb 13 '13 07:02 chjj