examples
examples copied to clipboard
feat: Photo storage example
Example React application that shows how to upload files to an assets canister with the @dfinity/assets
package.
Related PR https://github.com/dfinity/agent-js/pull/603
Thank you very much for this PR! I'd like to get back to this once https://github.com/dfinity/agent-js/pull/603 is merged. Feel free to ping me when you think I should take another look
Updated MR with above suggestions and fixed some bugs (replaced masonry dep with a more reliable masonry dep)
Looking nice, thanks a lot! Any chance you can also add a very basic e2e test to alert us (me) when a dfx update breaks the example? This is a good example you could work from. It doesn't need to be anything fancy
Also, the rust-basic-bitcoin
failed test will be fixed in master in a few minutes
Looking nice, thanks a lot! Any chance you can also add a very basic e2e test to alert us (me) when a dfx update breaks the example? This is a good example you could work from. It doesn't need to be anything fancy
Added a workflow that checks if the project builds and deploys successfully.
With npm i
and npm run build
I get the following error:
Failed to compile.
Module not found: Error: Can't resolve 'assert' in '/Users/ssiff/Desktop/examples/hosting/photo-storage/node_modules/@dfinity/identity/lib/esm/identity'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "assert": require.resolve("assert/") }'
- install 'assert'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "assert": false }
Is this a problem introduced by myself or something wrong with the code?
Is this a problem introduced by myself or something wrong with the code?
Seems like a problem in @dfinity/identity
0.14.1
, updating dependencies to 0.15.0
seems to fix it.
Thank you for fixing it that quickly! Can confirm it work now. Thank you very much for contributing!