Giter VIP home page Giter VIP logo

react-upload-file's Introduction

react-upload-file

NPM version NPM monthly downloads NPM total downloads Dependencies Status Build Status License Code Climate Test Coverage PR Welcome Pull Request Pull Request Closed

Archived

Please use other component.

react-upload-file's People

Contributors

haroenv avatar msyrus avatar perlmint avatar wubocong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

react-upload-file's Issues

Documentation should be better for custom buttons

The documentation heavily emphasises setting up custom buttons to handle selection of files, but it doesn't show any examples of what the code for such a custom button would look like.

If I don't set the custom button component properties then I do get a default button rendered, but it has no text on it. I can't see a way to simply set the display text on the default version of the button.

How to change the input name to add more uploads?

How to change the input name to add more uploads?

I need to insert several images one underneath the other, I do not want it to be a multiple input, I want it to be single with different names to be able to insert one by one. How can I do this?

Issues when multiple ReactUploadFile are on the page

There's an issue when two ReactUploadFile components are placed on a page.

The upload events of the second are handed by the callbacks of the first.

I assume, the component searches the DOM globally for an element and always finds the first one ...

Any workaround or fixes?

chooseFileButton's <YourChooseButton /> can't show

<ReactUploadFile options={uploadFileOptions}
chooseFileButton={<Button>f</Button>}
uploadFileButton={<Button color='green'
content='上传'
icon="upload"/>}/>
<Button>f</Button> can't show . Button is myself component

Component does not work

Hi everybody,

Thank's for this component but at home it does not work.

Indeed, the props.options are not overidded at all.

I make it worked, I just replaces the block by this one:

const options = _.defaults(props.options, { dataType: 'json', timeout: 0, numberLimit: 0, userAgent: window.navigator.userAgent, multiple: false, withCredentials: false, beforeChoose: emptyFunction, didChoose: emptyFunction, beforeUpload: emptyFunction, didUpload: emptyFunction, uploading: emptyFunction, uploadSuccess: emptyFunction, uploadError: emptyFunction, uploadFail: emptyFunction, onAbort: emptyFunction });

With lodash:

import _ from 'lodash';

uploadSuccess called on 400 response

I'm using the component to upload a file which causes a server side error and an HTTP 400 response, but the component is still calling the uploadSuccess function. I can't see that I'm doing anything wrong.

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.