Skip to content

not compatible with flattened multipart file uploads introduced in 0.4.0 #45

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

Closed
yusefnapora opened this issue Jul 19, 2016 · 2 comments
Closed

Comments

@yusefnapora
Copy link

Hi,

The 0.4.0 release of go-ipfs introduced a change to multipart file upload that breaks compatibility when adding directories (ipfs/kubo#2046)

Currently when adding a directory via py-ipfs-api with recursive=True, the server adds a plain file with multipart encoding noise, e.g.:

--7587cf2cd7c54e3393bc49f454e626ce
Content-Disposition: file; filename="a%2Fb"
Content-Type: multipart/mixed; boundary="debd9482563f4d0eb04c6dcfa5cef500"

--debd9482563f4d0eb04c6dcfa5cef500
Content-Disposition: file; filename="a%2Fb%2Fc"
Content-Type: application/octet-stream

abcd123

--debd9482563f4d0eb04c6dcfa5cef500--
--7587cf2cd7c54e3393bc49f454e626ce--

Instead of nested multipart items that are chunked by size, the API now expects one multipart boundary, with one part per file or directory. Also, directories and symlinks are now expected to have the Content-Type of application/x-directory or application/symlink.

Here's an example of the expected input format: https://github.com/ipfs/go-ipfs/blob/8c4900b3b8341fdc4667e57d9e45fe73bad4d123/commands/files/file_test.go#L82

@yusefnapora
Copy link
Author

It seems like #41 may be related, since this issue affects directory uploads

@whereswaldon
Copy link
Contributor

This is resolved by #46 , if it gets accepted.

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