{
  "_id": "@rc-component/upload",
  "maintainers": [
    {
      "name": "zombiej",
      "email": "smith3816@gmail.com"
    },
    {
      "name": "afc163",
      "email": "afc163@gmail.com"
    },
    {
      "name": "madccc",
      "email": "1075746765@qq.com"
    },
    {
      "name": "peachscript",
      "email": "scdzwyxst@gmail.com"
    },
    {
      "name": "chenshuai2144",
      "email": "wasd2144@hotmail.com"
    }
  ],
  "keywords": [
    "react",
    "react-component",
    "react-upload",
    "upload"
  ],
  "dist-tags": {
    "latest": "1.1.1"
  },
  "_rev": "3-e8cdf23dd93d8b6781dd885f3ae2d7d6",
  "description": "upload ui component for react",
  "readme": "# @rc-component/upload\n\nReact Upload\n\n[![NPM version][npm-image]][npm-url] [![npm download][download-image]][download-url] [![build status][github-actions-image]][github-actions-url] [![Codecov][codecov-image]][codecov-url] [![bundle size][bundlephobia-image]][bundlephobia-url] [![dumi][dumi-image]][dumi-url]\n\n[npm-image]: http://img.shields.io/npm/v/@rc-component/upload.svg?style=flat-square\n[npm-url]: http://npmjs.org/package/@rc-component/upload\n[travis-image]: https://img.shields.io/travis/react-component/upload/master?style=flat-square\n[travis-url]: https://travis-ci.com/react-component/upload\n[github-actions-image]: https://github.com/react-component/upload/actions/workflows/react-component-ci.yml/badge.svg\n[github-actions-url]: https://github.com/react-component/upload/actions/workflows/react-component-ci.yml\n[codecov-image]: https://img.shields.io/codecov/c/github/react-component/upload/master.svg?style=flat-square\n[codecov-url]: https://app.codecov.io/gh/react-component/upload\n[download-image]: https://img.shields.io/npm/dm/@rc-component/upload.svg?style=flat-square\n[download-url]: https://npmjs.org/package/@rc-component/upload\n[bundlephobia-url]: https://bundlephobia.com/package/@rc-component/upload\n[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/@rc-component/upload\n[dumi-url]: https://github.com/umijs/dumi\n[dumi-image]: https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square\n\n## Development\n\n```\nnpm install\nnpm start\n```\n\n## Example\n\nhttp://localhost:8000/\n\nonline example: https://upload.react-component.vercel.app/\n\n## Feature\n\n- support IE11+, Chrome, Firefox, Safari\n\n## install\n\n[![@rc-component/upload](https://nodei.co/npm/@rc-component/upload.png)](https://npmjs.org/package/@rc-component/upload)\n\n## Usage\n\n```js\nvar Upload = require('@rc-component/upload');\nvar React = require('react');\nReact.render(<Upload />, container);\n```\n\n## API\n\n### props\n\n| name | type | default | description |\n| --- | --- | --- | --- |\n| name | string | file | file param post to server |\n| style | object | {} | root component inline style |\n| className | string | - | root component className |\n| disabled | boolean | false | whether disabled |\n| component | \"div\" \\| \"span\" | \"span\" | wrap component name |\n| action | string &#124; function(file): string &#124; Promise&lt;string&gt; |  | form action url |\n| method | string | post | request method |\n| directory | boolean | false | support upload whole directory |\n| data | object/function(file) |  | other data object to post or a function which returns a data object(a promise object which resolve a data object) |\n| headers | object | {} | http headers to post, available in modern browsers |\n| accept | string |  | input accept attribute |\n| capture | string |  | input capture attribute |\n| multiple | boolean | false | only support ie10+ |\n| onStart | function |  | start upload file |\n| onError | function |  | error callback |\n| onSuccess | function |  | success callback |\n| onProgress | function |  | progress callback, only for modern browsers |\n| beforeUpload | function | null | before upload check, return false or a rejected Promise will stop upload, only for modern browsers |\n| customRequest | function | null | provide an override for the default xhr behavior for additional customization |\n| withCredentials | boolean | false | ajax upload with cookie send |\n| openFileDialogOnClick | boolean | true | useful for drag only upload as it does not trigger on enter key or click event |\n| pastable | boolean | false | support paste upload |\n\n#### onError arguments\n\n1. `err`: request error message\n2. `response`: request response, not support on iframeUpload\n3. `file`: upload file\n\n### onSuccess arguments\n\n1. `result`: response body\n2. `file`: upload file\n3. `xhr`: xhr header, only for modern browsers which support AJAX upload. since 2.4.0\n\n### customRequest\n\nAllows for advanced customization by overriding default behavior in AjaxUploader. Provide your own XMLHttpRequest calls to interface with custom backend processes or interact with AWS S3 service through the aws-sdk-js package.\n\ncustomRequest callback is passed an object with:\n\n- `onProgress: (event: { percent: number }): void`\n- `onError: (event: Error, body?: Object): void`\n- `onSuccess: (body: Object): void`\n- `data: Object`\n- `filename: String`\n- `file: File`\n- `withCredentials: Boolean`\n- `action: String`\n- `headers: Object`\n\n### methods\n\nabort(file?: File) => void: abort the uploading file\n\n## License\n\n@rc-component/upload is released under the MIT license.\n",
  "repository": {
    "type": "git",
    "url": "git+ssh://git@github.com/react-component/upload.git"
  },
  "bugs": {
    "url": "http://github.com/react-component/upload/issues"
  },
  "license": "MIT",
  "versions": {
    "1.0.0": {
      "name": "@rc-component/upload",
      "version": "1.0.0",
      "keywords": [
        "react",
        "react-component",
        "react-upload",
        "upload"
      ],
      "license": "MIT",
      "_id": "@rc-component/upload@1.0.0",
      "maintainers": [
        {
          "name": "zombiej",
          "email": "smith3816@gmail.com"
        },
        {
          "name": "afc163",
          "email": "afc163@gmail.com"
        },
        {
          "name": "madccc",
          "email": "1075746765@qq.com"
        },
        {
          "name": "peachscript",
          "email": "scdzwyxst@gmail.com"
        },
        {
          "name": "chenshuai2144",
          "email": "wasd2144@hotmail.com"
        }
      ],
      "homepage": "http://github.com/react-component/upload",
      "bugs": {
        "url": "http://github.com/react-component/upload/issues"
      },
      "dist": {
        "shasum": "8de5b9bef62f130cca764486cc443f88296b8717",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/@rc-component/upload/-/upload-1.0.0.tgz",
        "fileCount": 35,
        "integrity": "sha512-jRnGElnVycACSAm9DvDrOJuC1PefhwjkZH60DFUz836dJF4kfrOVhqTg86kD3gemcRRGIbxO8RA5tvsTk+q2rA==",
        "signatures": [
          {
            "sig": "MEYCIQD2nLRmaPoHaP4bPfbCX0Ahq7nguvP6cK0lrQVqtd3ZuwIhAIELrBgP1jt16nTaZMJWiUY1a3Ax6MDCdPEbjX1mBLNj",
            "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
          }
        ],
        "unpackedSize": 57989
      },
      "main": "./lib/index",
      "types": "./lib/index.d.ts",
      "module": "./es/index",
      "gitHead": "2e160a2b4c24d954e95dff302519528ca408823d",
      "scripts": {
        "lint": "eslint src/ --ext .ts,.tsx,.jsx,.js,.md",
        "test": "rc-test",
        "start": "dumi dev",
        "compile": "father build",
        "coverage": "rc-test --coverage",
        "prettier": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"",
        "now-build": "npm run docs:build",
        "docs:build": "dumi build",
        "docs:deploy": "npm run docs:build && gh-pages -d dist",
        "postpublish": "npm run docs:deploy",
        "prepublishOnly": "npm run compile && rc-np"
      },
      "_npmUser": {
        "name": "zombiej",
        "email": "smith3816@gmail.com"
      },
      "repository": {
        "url": "git+ssh://git@github.com/react-component/upload.git",
        "type": "git"
      },
      "_npmVersion": "10.9.2",
      "description": "upload ui component for react",
      "directories": {},
      "_nodeVersion": "22.15.1",
      "dependencies": {
        "classnames": "^2.2.5",
        "@rc-component/util": "^1.3.0"
      },
      "_hasShrinkwrap": false,
      "devDependencies": {
        "raf": "^3.4.0",
        "dumi": "^2.1.0",
        "axios": "^1.9.0",
        "react": "^18.0.0",
        "sinon": "^9.0.2",
        "eslint": "^8.0.0",
        "father": "^4.0.0",
        "rc-test": "^7.0.13",
        "fs-extra": "^11.2.0",
        "gh-pages": "^6.1.1",
        "vinyl-fs": "^4.0.0",
        "co-busboy": "^2.0.2",
        "coveralls": "^3.0.3",
        "cross-env": "^7.0.0",
        "react-dom": "^18.0.0",
        "typescript": "^5.3.3",
        "@types/jest": "^30.0.0",
        "@types/react": "^18.0.0",
        "@umijs/fabric": "^4.0.1",
        "@rc-component/np": "^1.0.4",
        "@types/react-dom": "^18.0.0",
        "regenerator-runtime": "^0.14.1",
        "@testing-library/react": "^16.2.0",
        "@testing-library/jest-dom": "^6.1.5",
        "@rc-component/father-plugin": "^2.0.2"
      },
      "peerDependencies": {
        "react": ">=16.9.0",
        "react-dom": ">=16.9.0"
      },
      "_npmOperationalInternal": {
        "tmp": "tmp/upload_1.0.0_1759047678216_0.4514754494547575",
        "host": "s3://npm-registry-packages-npm-production"
      }
    },
    "1.1.0": {
      "name": "@rc-component/upload",
      "version": "1.1.0",
      "keywords": [
        "react",
        "react-component",
        "react-upload",
        "upload"
      ],
      "license": "MIT",
      "_id": "@rc-component/upload@1.1.0",
      "maintainers": [
        {
          "name": "zombiej",
          "email": "smith3816@gmail.com"
        },
        {
          "name": "afc163",
          "email": "afc163@gmail.com"
        },
        {
          "name": "madccc",
          "email": "1075746765@qq.com"
        },
        {
          "name": "peachscript",
          "email": "scdzwyxst@gmail.com"
        },
        {
          "name": "chenshuai2144",
          "email": "wasd2144@hotmail.com"
        }
      ],
      "homepage": "http://github.com/react-component/upload",
      "bugs": {
        "url": "http://github.com/react-component/upload/issues"
      },
      "dist": {
        "shasum": "cb634587ffdf8a8a4a26a279fac06989fb47f593",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/@rc-component/upload/-/upload-1.1.0.tgz",
        "fileCount": 35,
        "integrity": "sha512-LIBV90mAnUE6VK5N4QvForoxZc4XqEYZimcp7fk+lkE4XwHHyJWxpIXQQwMU8hJM+YwBbsoZkGksL1sISWHQxw==",
        "signatures": [
          {
            "sig": "MEUCIFIk5CNIdrTuCtQaJOFWw1lTSsuZSD5p4GebL/2JqJ2xAiEAnBUO079SmHbFzew8Emm5Ijhk8i4TFTTl93rsQ2WTTJU=",
            "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
          }
        ],
        "unpackedSize": 58992
      },
      "main": "./lib/index",
      "types": "./lib/index.d.ts",
      "module": "./es/index",
      "gitHead": "705141ce4f2c3d1c506fd0cef9531ae48d8dfc5d",
      "scripts": {
        "lint": "eslint src/ --ext .ts,.tsx,.jsx,.js,.md",
        "test": "rc-test",
        "start": "dumi dev",
        "compile": "father build",
        "coverage": "rc-test --coverage",
        "prettier": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"",
        "now-build": "npm run docs:build",
        "docs:build": "dumi build",
        "docs:deploy": "npm run docs:build && gh-pages -d dist",
        "postpublish": "npm run docs:deploy",
        "prepublishOnly": "npm run compile && rc-np"
      },
      "_npmUser": {
        "name": "zombiej",
        "email": "smith3816@gmail.com"
      },
      "repository": {
        "url": "git+ssh://git@github.com/react-component/upload.git",
        "type": "git"
      },
      "_npmVersion": "10.9.2",
      "description": "upload ui component for react",
      "directories": {},
      "_nodeVersion": "22.15.1",
      "dependencies": {
        "clsx": "^2.1.1",
        "@rc-component/util": "^1.3.0"
      },
      "_hasShrinkwrap": false,
      "devDependencies": {
        "dumi": "^2.1.0",
        "axios": "^1.9.0",
        "react": "^18.0.0",
        "sinon": "^9.0.2",
        "eslint": "^8.0.0",
        "father": "^4.0.0",
        "rc-test": "^7.0.13",
        "fs-extra": "^11.2.0",
        "gh-pages": "^6.1.1",
        "vinyl-fs": "^4.0.0",
        "co-busboy": "^2.0.2",
        "coveralls": "^3.0.3",
        "cross-env": "^10.1.0",
        "react-dom": "^18.0.0",
        "typescript": "^5.3.3",
        "@types/jest": "^30.0.0",
        "@types/node": "^24.5.2",
        "@types/react": "^19.2.2",
        "@umijs/fabric": "^4.0.1",
        "@rc-component/np": "^1.0.4",
        "@types/react-dom": "^19.2.2",
        "regenerator-runtime": "^0.14.1",
        "@testing-library/react": "^16.2.0",
        "@testing-library/jest-dom": "^6.1.5",
        "@rc-component/father-plugin": "^2.0.2"
      },
      "peerDependencies": {
        "react": ">=16.9.0",
        "react-dom": ">=16.9.0"
      },
      "_npmOperationalInternal": {
        "tmp": "tmp/upload_1.1.0_1761892707120_0.11129739285173335",
        "host": "s3://npm-registry-packages-npm-production"
      }
    },
    "1.1.1": {
      "name": "@rc-component/upload",
      "version": "1.1.1",
      "description": "upload ui component for react",
      "keywords": [
        "react",
        "react-component",
        "react-upload",
        "upload"
      ],
      "homepage": "http://github.com/react-component/upload",
      "bugs": {
        "url": "http://github.com/react-component/upload/issues"
      },
      "repository": {
        "type": "git",
        "url": "git+ssh://git@github.com/react-component/upload.git"
      },
      "license": "MIT",
      "main": "./lib/index",
      "module": "./es/index",
      "scripts": {
        "compile": "father build",
        "coverage": "rc-test --coverage",
        "docs:build": "dumi build",
        "docs:deploy": "npm run docs:build && gh-pages -d dist",
        "lint": "eslint src/ --ext .ts,.tsx,.jsx,.js,.md",
        "now-build": "npm run docs:build",
        "prepublishOnly": "npm run compile && rc-np",
        "prettier": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"",
        "postpublish": "npm run docs:deploy",
        "start": "dumi dev",
        "test": "rc-test"
      },
      "dependencies": {
        "@rc-component/util": "^1.11.1",
        "clsx": "^2.1.1"
      },
      "devDependencies": {
        "@rc-component/father-plugin": "^2.2.0",
        "@rc-component/np": "^1.0.4",
        "@testing-library/jest-dom": "^6.1.5",
        "@testing-library/react": "^16.2.0",
        "@types/jest": "^30.0.0",
        "@types/node": "^25.0.1",
        "@types/react": "^19.2.2",
        "@types/react-dom": "^19.2.2",
        "@umijs/fabric": "^4.0.1",
        "axios": "^1.9.0",
        "dumi": "^2.1.0",
        "eslint": "^8.0.0",
        "father": "^4.0.0",
        "gh-pages": "^6.1.1",
        "rc-test": "^7.0.13",
        "react": "^18.0.0",
        "react-dom": "^18.0.0",
        "regenerator-runtime": "^0.14.1",
        "sinon": "^9.0.2",
        "typescript": "^5.3.3"
      },
      "peerDependencies": {
        "react": ">=16.9.0",
        "react-dom": ">=16.9.0"
      },
      "gitHead": "d53036dbfab8b2efca4942a7f8c76d15fbdcafc5",
      "types": "./lib/index.d.ts",
      "_id": "@rc-component/upload@1.1.1",
      "_nodeVersion": "22.15.1",
      "_npmVersion": "11.7.0",
      "dist": {
        "integrity": "sha512-GvYWSKeaJTOxxC5p6+nOSadzfvXA1h8C/iHFPFZX+szH3JUXrvs+DLiW8YUTBgvMh8m63mJeHrlYlJzAlg+pDA==",
        "shasum": "90d16edcdaeb104ffa9111fd0b428061de7c21ac",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/@rc-component/upload/-/upload-1.1.1.tgz",
        "fileCount": 35,
        "unpackedSize": 58977,
        "signatures": [
          {
            "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U",
            "sig": "MEUCIQCBLsUgqRwjLeyKSbbKls20ng6hGeOUqQ9xoW5nTr0qNwIgELbEzizTisLkAeljQBzsQIpLzbqyfWyBy8tAnfexkw8="
          }
        ]
      },
      "_npmUser": {
        "name": "zombiej",
        "email": "smith3816@gmail.com"
      },
      "directories": {},
      "maintainers": [
        {
          "name": "zombiej",
          "email": "smith3816@gmail.com"
        },
        {
          "name": "afc163",
          "email": "afc163@gmail.com"
        },
        {
          "name": "madccc",
          "email": "1075746765@qq.com"
        },
        {
          "name": "peachscript",
          "email": "scdzwyxst@gmail.com"
        },
        {
          "name": "chenshuai2144",
          "email": "wasd2144@hotmail.com"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages-npm-production",
        "tmp": "tmp/upload_1.1.1_1779780998671_0.46266048295966256"
      },
      "_hasShrinkwrap": false
    }
  },
  "name": "@rc-component/upload",
  "time": {
    "created": "2025-09-28T08:21:18.073Z",
    "modified": "2026-07-10T05:42:03.145Z",
    "1.0.0": "2025-09-28T08:21:18.405Z",
    "1.1.0": "2025-10-31T06:38:27.287Z",
    "1.1.1": "2026-05-26T07:36:38.804Z"
  },
  "readmeFilename": "README.md",
  "homepage": "http://github.com/react-component/upload"
}