Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multipart upload not working as advertised #1915

Closed
dignifiedquire opened this issue Oct 30, 2015 · 4 comments
Closed

Multipart upload not working as advertised #1915

dignifiedquire opened this issue Oct 30, 2015 · 4 comments

Comments

@dignifiedquire
Copy link
Member

According to @whyrusleeping when uploading files via the http api using add -r the request should not need to nest the multipart parts into each other, but can be simply submitted as a list. But if I try to attempt sending such a request I get the error File argument 'path' is required back.

Here is the wireshark dump of the request that's being sent: https://gist.github.com/Dignifiedquire/bc72721f5b96c7017188

Tested versions: 0.3.7, 0.3.9-dev.

@rht
Copy link
Contributor

rht commented Oct 31, 2015

Currently it is created only when the content type is "multipart/form-data": https://github.com/ipfs/go-ipfs/blob/master/commands/http/parse.go#L99.

@dignifiedquire
Copy link
Member Author

Closing for now as it does work, just not very intuitive.

@rht
Copy link
Contributor

rht commented Nov 23, 2015

This could be added right away since https://github.com/ipfs/go-ipfs/blob/master/commands/files/multipartfile.go#L68 also checks the case for 'multipart/mixed'.

@rht
Copy link
Contributor

rht commented Nov 23, 2015

Actually, the lib itself, r.MultipartReader, doesn't handle multipart/mixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants