Coder Social home page Coder Social logo

ipfs-uploader's People

Contributors

osaguild avatar

Watchers

 avatar  avatar

ipfs-uploader's Issues

create uploadselector component

  • click button, show file selector
  • select file, status of button change loading
  • after uploading status of button change disabled

create ipfs component

  • uploadFile: send file to ipfs, and return file path.
  • uploadMetaData: send metadata to ipfs

add form which can specify metadata

  • sample metadata
{
    "name": "Patient Token",
    "description": "erc721 token for medical data.",
    "image": "https://gateway.pinata.cloud/ipfs/QmYU1CwEXQaX7yah4Ast7mVuG7M8p52hPWZHYAYDh9evY2"
}

show loading image

  • disable all formd during loading
  • show loading image until finished loading

fix useState bug

  • when I text on "name" error is occurred
Warning: A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. 

image

fix devendencies

  • add axios
  • remove @emotion/react @emotion/styled framer-motion react-dom react-scripts

create Submit component

  • after select file, submit component become active
  • click submit, call component to send file to ipfs

fix warning of ReactDOM.render

Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17.

fix warning of CORS

Access to fetch at 'https://storybook.chakra-ui.com/metadata.json?version=2.2.8' from origin 'http://localhost:6006' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

image

update input form

  • form lists are name / discription / image
  • key / value is optional and can be set by props of component

use context for file

  • file is injected as props, but should be injected as context. because file is global context on ifps uploader

remove chakraui

  • less dependencies is good to npm package, I should remove chakraui and style native css.
  • If remove chakraui, I can delete these packages
  • @chakra-ui/react @emotion/react @emotion/styled framer-motion

add EventType

  • current EventTypes are FILE_SELECTED / UPLOADED / UPLOAD_FAILED
  • tobe is SELECTED, UPLOADING, SUCCESS, FAILED

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.