Horje
Basic Implementation of RC Upload plugin with custom upload handler Code Example
Basic Implementation of RC Upload plugin with custom upload handler
import Upload from "rc-upload";
import { useState } from "react";

export default function App() {
  const [myFile, setMyFile] = useState();

  const uploadProps = {
    data: { a: 1, b: 2 },
    customRequest({ file, data }) {
      console.log("file", file);
      console.log("data", data);
      setMyFile(file.uid);
    }
  };

  return (
    <div className="App">
      <h1>Hello CodeSandbox</h1>
      <h2>Start editing to see some magic happen!</h2>
      <Upload {...uploadProps}>
        <button>ciao</button>
      </Upload>
      <div>{myFile}</div>
    </div>
  );
}




Whatever

Related
rgb diode esp32 Code Example rgb diode esp32 Code Example
navigator push named Code Example navigator push named Code Example
arp layer 2 or 3 Code Example arp layer 2 or 3 Code Example
rvm change ruby version Code Example rvm change ruby version Code Example
what is the easiest coding language Code Example what is the easiest coding language Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8