Giter VIP home page Giter VIP logo

react-filepicker's People

Contributors

dependabot[bot] avatar derkobe avatar greenkeeperio-bot avatar imgbotapp avatar lk0001 avatar zerocho 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-filepicker's Issues

Responsive Images

This is not an issue of this code but in conjuction with it, so I thought I post it here and hope for the best :-)

I want to write a React-Component for the Filestack's responsive images like so. But the moment I require or import "filepicker-js", the picker won't work anymore. Any idea how this could work together?

import React from "react"

export default class FPImage extends React.Component {
  componentDidMount() {
    const filepicker = require("filepicker-js")
    filepicker.responsive()
  }

  render() {
    const { src, style, filestackApikey } = this.props
    return(
      <img
        style={style}
        data-fp-src={src}
        data-fp-apikey={filestackApikey}
        data-fp-on-resize="none"
        data-fp-image-quality="50"
      />
    )
  }
}

component options not responding to state changes

I have a controlled input for setting the height of a component to allow me to set the correct cropRatio that I need for the final image. The width of the image is set to 600 and the height is originally set to 200 giving an aspect ratio of 3. The options I'm passing into the control trace out to the console as follows:

{
    "imageQuality": 100,
    "buttonText": "Upload Banner",
    "backgroundUpload": false,
    "mimetypes": ["image/*"],
    "imageDim": [600, 200],
    "cropForce": true,
    "cropRatio": 3
}

When I update the text field for the image height to 100, I can see the imageDim and and cropRatio reflected in the console as:

{
    "imageQuality": 100,
    "buttonText": "Upload Banner",
    "backgroundUpload": false,
    "mimetypes": ["image/*"],
    "imageDim": [600, 100],
    "cropForce": true,
    "cropRatio": 6
}

However... when I click the Button labeled "Upload Banner", the cropRatio matches the default, and not the updated options. Is there an additional step, am I doing something wrong or is this a bug?

Cannot read property 'videoRes' of undefined

Hey,
I'm trying to use react-filepicker but I keep getting "Cannot read property 'videoRes' of undefined" and I can't figure out why.

This is my setup:

In my Form Field Component:

<ReactFilepicker apikey={filestack} onSuccess={this.changeInput} options={{
                    buttonText: 'Upload picture',
                    buttonClass: 'btn btn-primary',
                    services: ['COMPUTER', 'CONVERT'],
                    conversions: ['crop', 'rotate', 'filter'],
                    mimetype: 'image/*',
                    container: 'modal',
                    imageDim: [450, 450],
                    cropRatio: 1,
                    cropForce: true,
                    multiple: false,
                    location: 'S3',
                    access: 'public',
                    path: `user_avatars/${moment().format('DD-MM-YYYY')}/`,
                  }} />

Any clue why this happens? I can't figure it out...

Error when attempting to load videos

I am trying to create a file picker that is limited to just video file formats but I am receiving an error when the picker is loaded.

[uuid=A097EC5393404C5E] Error: the service convert couldn't be found or does not support the given mimetype(s): [u'video/*']

I am using it as follows:

Usage

<ReactFilepicker apikey={API_KEY} defaultWidget={false} options={options} onSuccess={this.uploadSuccess.bind(this)} />

Options

{
        buttonText  : 'Add Video Resume',
        mimetype    : 'video/*',
        buttonClass : 'buttonClass',
        cropRatio   : 1,
        conversions : ['crop', 'rotate', 'filter'],
        services    : ['CONVERT', 'COMPUTER', 'DROPBOX', 'FACEBOOK', 'INSTAGRAM', 'URL', 'WEBCAM', 'GOOGLE_DRIVE', 'GMAIL', 'BOX', 'CLOUDDRIVE', 'GITHUB', 'FLICKR', 'EVERNOTE', 'SKYDRIVE', 'PICASA', 'CLOUDAPP', 'IMGUR']
      }

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.