parted
parted copied to clipboard
Parting Multipart, but not all JSON
@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 doPUT 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?
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.