GithubHelp home page GithubHelp logo

adrians5j / react-butterfiles Goto Github PK

View Code? Open in Web Editor NEW
44.0 44.0 9.0 988 KB

🦋 Component for building file fields - from basic file inputs to drag and drop image galleries.

Home Page: https://react-butterfiles.netlify.com

License: MIT License

JavaScript 100.00%
drag-and-drop file-upload files images react

react-butterfiles's People

Contributors

adrians5j avatar readeral 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-butterfiles's Issues

Question:: how to get files?

@doitadrian Is it possible to get files from input after upload?

document.getElementById('selectedFiles').files

Files array is empty. Is there another way?

Add a filter by file name in regex format

This is:

  • Feature request
  • Idea

Detailed Description

For example, Microsoft SharePoint has the following restrictions on the file name:
Information about the characters that you cannot use in file names:

  • Do not use: " # % & * : < > ? \ / { | } ~
  • File names cannot be longer than 128 characters
  • Do not use the period character consecutively in the middle of a file name. For example, "file..name.docx" is invalid.
  • You cannot use the period character at the end of a file name. For example, “filename..docx” is invalid.
  • You cannot start a file name with the period character
  • Many other symbols are not recommended such as $^()-_=+[]`! (other international currency symbols and international symbols should be avoided in site names, but some are more acceptable in file names. Ascii is preferred when possible.

Possible Solution

Possible property name: filter or regexFilter

React-butterfiles only accepts PDF format

React-butterfiles only accepts PDF format.

I have started using this library for images, but now I want to upload documents as well, and I am trying to upload the given formats
Is there any way to do it?
".doc",
".docx",
".htm",
".html",
".odt",
".pdf",
".xls",
".xlsx",
".ppt",
".pptx",
".txt"

@adrians5j @readeral

Add a basic look for the drop zone

This is:

  • Bug
  • Question

Expected Behavior

It is necessary that when you hover the file over the entire File component, the entire area would be a drop zone with a similar design.
example

Actual Behavior

Drop zone is presented as in the example, but it does not work because it has zero height.
<div {...getDropZoneProps({className: "myDropZone"})}/>

Steps to Reproduce the Problem

  1. Add the code from the example
  2. Move a file to the zone of the File component
  3. Now this zone by default resembles the eye of a needle

Possible Solution

Displaying the drop zone in full size is initially simple, but visually not beautiful, because takes up a lot of space. But if you make a hover effect, in which the entire zone of the File component becomes a drop zone - this is cool.

Wrapping div causes styling limitations

This is:

  • Bug
  • Feature request

Specifications

  • version:
  • OS:
  • Browser:

Expected Behavior

Passing the <input> a grid item property via the getDropZoneProps should result in the <input> being laid out upon the grid

Actual Behavior

Due to to the component's wrapping <div>, the <input> is not a direct child of a wrapper with the display: grid property, and so is not placed on the grid.

Steps to Reproduce the Problem

  1. Place <Files /> component within a wrapping <div> with the css property of display: grid and other grid related syntax
  2. Pass css props via getDropZoneProps placing the input on a grid (e.g. grid-column: 1/2
  3. input will not position correctly

Detailed Description

See pull request

Possible Solution

See pull request

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.