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

Add uploads to MFS when external IPFS API is used #24

Closed
lidel opened this issue Sep 8, 2018 · 2 comments
Closed

Add uploads to MFS when external IPFS API is used #24

lidel opened this issue Sep 8, 2018 · 2 comments

Comments

@lidel
Copy link
Member

lidel commented Sep 8, 2018

As noted in Design: Pinning Content we are moving away from using low level pins and instead we keep data around by adding references to MFS.

First part is already done in this app, it does not pin uploaded content:

ipfs.add(stream, { pin: false, progress: updateProgress })

What is missing is adding content to MFS.

Of course we don't want to do that when fallback to browserified js-ipfs is used, but if external IPFS API is accessed over HTTP API or window.ipfs there should be an additional step of adding wrapping directory to MFS.

We should put the time of upload in the name of root directory to make it possible to display uploads in lexical order (this enables user to cleanup old uploads or easily find the latest one)

Maybe something like /shared/YYYY-MM-YY_HH-MM-SS?
It does not pollute the MFS root and is self-explanatory.

cc @ipfs-shipyard/gui ipfs/ipfs-companion#415

@fsdiogo
Copy link
Contributor

fsdiogo commented Sep 28, 2018

I don't see the point of using the MFS for this app, at least in its first stages 🤔

For now this app is oriented for just one flow:

  1. You add files to IPFS
  2. Share the link
  3. Done

When you get back to the app is to start the flow all over again, instead of modifying the state of what you previously added (you can't even do that right now).

@lidel
Copy link
Member Author

lidel commented Sep 28, 2018

I think you are right. It is better to keep this as an explicit user action.
WebUI now has option to "Add from IPFS Path" so it should be enough for first iteration.

I am closing this, we may revisit this when integration between webui and share app begins.

@lidel lidel closed this as completed Sep 28, 2018
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