Maybe in the form of a checkbox or something in the quick upload UI. Would be nice for my uses because if I share a file to another user using a public gateway the filename is not preserved when they try and save the file. This is a bigger problem on Windows because it relies so much on file extensions.
Ok, so I want to give a go at this one ๐
So I will try to summarize the current status:
wrap-with-directoryoption.So the following steps are needed:
wrap-with-directory option to File.add in:I have a working implementation of this option in js-ipfs _HTTP API_, and I'm working on adding it to js-ipfs _Core_ also.
@lidel from an UX perspective do you think the checkbox field that @falsechicken mentioned is a good option, or could this functionality be activated by default?
@nunofmn sounds good to me ๐ the summary and list of steps are very helpful, thanks!
If you are able to add it to the API, that would be beneficial to other projects using js-ipfs-api.
The task is yours โ go for it! ๐
Just for the record, here is a backup plan, if extending API turns out to be not feasible:
upload file the old way + assemble wrapping directory manually via object API:
file addโ<file_cid>object new unixfs-dirโ<dir_cid>object path <dir_cid> add-link <filename> <file_cid>โ<dir_with_file_cid>pin <dir_with_file_cid>
I think we should have an explicit checkbox on the bottom of the upload form.
And it should be checked by default because most of users will want to preserve file name.
Reasons for preserving file name by default:
FYI this feature just landed in beta channel: v2.2.2.9320. Implementation details in PR https://github.com/ipfs-shipyard/ipfs-companion/pull/479.
Big thank you to everyone who contributed necessary changes to upstream libs and specs.
Embedded node does not support it yet, but that will be tracked in #482.
Most helpful comment
Ok, so I want to give a go at this one ๐
So I will try to summarize the current status:
wrap-with-directoryoption.So the following steps are needed:
wrap-with-directoryoption to File.add in:I have a working implementation of this option in js-ipfs _HTTP API_, and I'm working on adding it to js-ipfs _Core_ also.
@lidel from an UX perspective do you think the checkbox field that @falsechicken mentioned is a good option, or could this functionality be activated by default?