-
Notifications
You must be signed in to change notification settings - Fork 489
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
Upload via WebUI (ipfs.files.write --create) produces different hash than CLI (ipfs.add) #676
Comments
Merged
This is fixed on |
👌 |
lidel
added a commit
to jay-dee7/ipfs-webui
that referenced
this issue
Aug 26, 2020
The way import via Webui works is: 1. `ipfs add` produces CID 2. we create a reference to that CID in MFS We do this to produce the same CID as regular ipfs add from CLI would do, mainly to avoid issue described in: ipfs#676
jessicaschilling
added a commit
that referenced
this issue
Aug 26, 2020
* [WIP] Feature - CLI Tutor Mode Signed-off-by: Jasdeep Singh <jasdeepsingh.uppal@gmail.com> * Update src/components/cli-tutor-mode/CliTutorMode.js Co-authored-by: Jessica Schilling <jessica@protocol.ai> * Update src/components/cli-tutor-mode/CliTutorMode.js Co-authored-by: Jessica Schilling <jessica@protocol.ai> * Align fix: cli tutor modal buttons Signed-off-by: Jasdeep Singh <jasdeepsingh.uppal@gmail.com> * Fix: added compatibility with ApiAddressForm component Signed-off-by: Jasdeep Singh <jasdeepsingh.uppal@gmail.com> * Fix: added bundle-reactx pattern and en translation keys Signed-off-by: Jasdeep Singh <jasdeepsingh.uppal@gmail.com> * i18n text change * Standardize i18n and visual style on Settings page * Text tweak; replace CliTutorMode.css with tachyons equivalents * Left-justify shell content in modals for consistency * Tidy visual presentation of modals * Size tweak for icon on Files page * Use StrokeCode instead of CopyIcon, adjust text accordingly * Lighten icon on settings page explainer text * Margin consistency * Update src/bundles/files/consts.js Co-authored-by: Marcin Rataj <lidel@lidel.org> * Move lh-copy so doesn't fubar checkbox styling * Fix: Close modal on copy to clipboard Signed-off-by: Jasdeep Singh <jasdeepsingh.uppal@gmail.com> * Fix: rename file command Signed-off-by: Jasdeep Singh <jasdeepsingh.uppal@gmail.com> * Fix: delete file by filepath and added type information for cliCommandList Signed-off-by: Jasdeep Singh <jasdeepsingh.uppal@gmail.com> * fix: whitespace in ipfs files rm Without this below will fail: ipfs files rm -r /test/white space/flowers.jpeg * fix: remove UPDATE_API_SERVER_ADDRESS This removed CLI tutor from "API Adddress" selector because it does not make sense: "API ADDRESS" section does not change the config of IPFS node, but defines the API which WebUI will use when connecting to the node. * fix: eslint * fix: remove angle brackets from i18n strings text between < and > won't be translated because Transifex blackboxes HTML tags, it is better to remove it * Move cliModal i18n keys into app.json See https://react.i18next.com/guides/multiple-translation-files * Move copyCommand & relevant close i18n keys into app.json * fix: include files cp step The way import via Webui works is: 1. `ipfs add` produces CID 2. we create a reference to that CID in MFS We do this to produce the same CID as regular ipfs add from CLI would do, mainly to avoid issue described in: #676 * refactor: make it easier to support path Right now CLI tutor defaults to MFS root at /, this makes it easier to include current path in the future. Co-authored-by: Jessica Schilling <jessica@protocol.ai> Co-authored-by: Marcin Rataj <lidel@lidel.org>
This was referenced Oct 9, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(Originally reported in ipfs-inactive/support#45, today it was raised on irc)
Discrepancy between
ipfs.add
andipfs.files.write --create
was discussed and explained in ipfs-inactive/support#45, this issue is only about solving UX problem in WebUI.How to Reproduce
file.jpg
ipfs add file.jpg
Files
screen in old webuifile.jpg
Copy hash
Current behavior
Copied value is
QmWKsy9a3AU3Yn9SDuqUFNMnxFnsGq5KzkKgZREsr1cifv
and notQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR
.In short
ipfs.files.write --create
(used by old webui) produces different hash thanipfs.add
, for reasons notes in ipfs-inactive/support#45 (comment):ipfs.files.write --create
Expected behavior
Most of users assume that hash will not change if the upload is done with "default settings of default tools". Value returned by
ipfs.add
sets expectation for entire ecosystem.AFAIK an easy fix would be to switch WebUI's upload to use
ipfs.add
and thenipfs.files.cp
:ipfs.add --pin=false && ipfs.files.cp
(I think we don't want to pin, as presence in MFS will be enough to protect files from GC)
The text was updated successfully, but these errors were encountered: