npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-upload-2-express

v1.0.3

Published

Made with create-react-library

Downloads

1

Readme

react-upload-2-express

Made with create-react-library

NPM JavaScript Style Guide

Install

npm install --save react-upload-2-express

如何使用

主要属性有

| PropsName | Type | 是否必须 | 默认值|描述| 备注 | |---|---|---|---|--|--| |projectId| String| 是 | | 项目名称 | | | userId | String | 否 | default | 上传用户的标识 | 方便后台索引使用 | uid | String | 否 | 当前时间戳 | 上传独立编号, 用来唯一标识在上传用户的某一次上传 | 也可使用 buildUidFunc 属性 在上传前生成 | | buildUidFunc | Function | 否 | 当前时间戳 | 当点击后, 通过传入的方法生成UID | 此方式用来处理只有点击的刹那, 才能最终确定 uid 值的情况, buildUidFunc 的优先级低于确定的 uid 属性 | | showLink | Boolean | 否 | true | 是否在上传完毕后显示图片的地址 || | defaultUploadedUrl | String | 否 | null | 初始化最终的地址 | 一般用在绑定 form 值上, 如果是前后端分离项目, 可不填写 | | panelClass | String | 否| | 指定操作区css 的 class 名称 | 操作区有固定class upload-panel-buttons, 可以在css中制定样式 | | showDirectLink | Boolean | 否 | true | 是否显示浏览器直接上传链接 | | | directLinkClass | String | 否 | | 上传跳转链接标签的 class 名称 | 操作区中的 上传跳转链接 的class, 有固定class direct-upload-link, 可以在css 中指定样式| | showQrCodeLink | Boolean |否 | true | 是否显示二维码上传链接 | | qrCodeLinkClass | String | 否 | | 二维码扫码上传的 class 名称| | RenderDom | ReactDom | 否 | | 渲染上传完毕后的节点 | props 为 url , 可以在使用过程中自定义这个显示渲染的节点 | | showUploadedImg |Boolean | 否| true |上传完毕后, 是否自动将新的图片添加到 Panel 中| | uploadedImgStyle | Object | 否 | | 图片的css object | | | updatedFunc | Function | 否 | 上传完毕后, 执行的方法 | 参数为 url, 即图片地址 |

Usage

import React, { Component } from 'react'

import Upload2Express from 'react-upload-2-express'

const ele = ({url}) => (<p>{url}</p>)

const Example = ()  =>  {
  return <Upload2Express projectId="demo" RenderDom={ele} />
}

License

MIT © jicheng1014