Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

feat: support UnixFSv1.5 metadata #1186

Merged
merged 13 commits into from
Jan 9, 2020
Merged

Conversation

achingbrain
Copy link
Collaborator

@achingbrain achingbrain commented Nov 27, 2019

Copy link
Contributor

@alanshaw alanshaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please can we have a few interface tests for these changes?

src/add/form-data.js Outdated Show resolved Hide resolved
src/add/form-data.browser.js Outdated Show resolved Hide resolved
@achingbrain
Copy link
Collaborator Author

Adding interface tests are blocked by ipfs/js-ipfs#2625

@achingbrain achingbrain marked this pull request as ready for review December 6, 2019 15:23
formData.append(`dir-${i}`, new Blob([], { type: 'application/x-directory' }), encodeURIComponent(file.path))
formData.append(`dir-${i}`, new Blob([], { type: 'application/x-directory' }), encodeURIComponent(file.path), {
header: headers
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is working...

const fd = new FormData
fd.append('test', new Blob(['data'], { type: 'application/octet-stream' }), 'path', { header: { mtime: Date.now(), mode: 'rwx' } })

const opts =  { method: 'post', body: fd }
const r0 = new Request('/test', opts)

await r0.text()
"-----------------------------21291924801818001399752183477

Content-Disposition: form-data; name=\"test\"; filename=\"path\"

Content-Type: application/octet-stream



data

-----------------------------21291924801818001399752183477--

"

src/add/form-data.browser.js Outdated Show resolved Hide resolved
@achingbrain
Copy link
Collaborator Author

I'm going to merge this to stop it getting stale - interface tests are in & skipped for go-IPFS, we can address any issues in further (smaller) PRs.

@achingbrain achingbrain merged commit da9d17a into master Jan 9, 2020
@achingbrain achingbrain deleted the support-unixfs-metadata branch January 9, 2020 11:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants