Giter VIP home page Giter VIP logo

Comments (10)

felixrieseberg avatar felixrieseberg commented on August 30, 2024

Hey @jasecoop! That's actually not an error with this implementation of Dropzone, but Dropzone itself. It's easy to fix though: Dropzone will be fine with you not having a URL if you wrap it in a <form></form> element. Are you using one? If not, I could try to see if we have an error here.

from react-dropzone-component.

jasecoop avatar jasecoop commented on August 30, 2024

@felixrieseberg Thanks, Felix. I thought it might be a result of Dropzone.

My Dropzone is actually on the body, so there's no form.

Any thoughts how I can get round this?

from react-dropzone-component.

felixrieseberg avatar felixrieseberg commented on August 30, 2024

If you've done everything right - and you really don't want to put it into a form - a small change I just pushed (4.0.2) should help you out, as it disables Dropzone's autodiscover feature.

from react-dropzone-component.

mtando avatar mtando commented on August 30, 2024

Hi Felix, i still got this issue using React-Dropzone-Component v 0.4.4.. could you please advise? Thanks

from react-dropzone-component.

felixrieseberg avatar felixrieseberg commented on August 30, 2024

Well, we'll reopen the issue, that's for sure ;-) Let me give it a try - I'll report back.

from react-dropzone-component.

 avatar commented on August 30, 2024

Same issue here and the Dropzone component is in a

.

Uncaught Error: No URL provided.Dropzone
@ app.browserify.js?a2f755f9927317c268cf4a67a22e62a209b218cd:736React.createClass.componentDidMount
@ app.browserify.js?a2f755f9927317c268cf4a67a22e62a209b218cd:61assign.notifyAll
@ react.browserify.js?345ed1d2c9fb8e823a80b4ddddc390a5a28d2b87:1079ON_DOM_READY_QUEUEING.close
@ react.browserify.js?345ed1d2c9fb8e823a80b4ddddc390a5a28d2b87:14624Mixin.closeAll
@ react.browserify.js?345ed1d2c9fb8e823a80b4ddddc390a5a28d2b87:18677Mixin.perform
@ react.browserify.js?345ed1d2c9fb8e823a80b4ddddc390a5a28d2b87:18618batchedMountComponentIntoNode
@ react.browserify.js?345ed1d2c9fb8e823a80b4ddddc390a5a28d2b87:12564Mixin.perform
@ react.browserify.js?345ed1d2c9fb8e823a80b4ddddc390a5a28d2b87:18604ReactDefaultBatchingStrategy.batchedUpdates
@ react.browserify.js?345ed1d2c9fb8e823a80b4ddddc390a5a28d2b87:9612batchedUpdates
@ react.browserify.js?345ed1d2c9fb8e823a80b4ddddc390a5a28d2b87:16619ReactMount._renderNewRootComponent
@ react.browserify.js?345ed1d2c9fb8e823a80b4ddddc390a5a28d2b87:12699ReactPerf.measure.wrapper
@ react.browserify.js?345ed1d2c9fb8e823a80b4ddddc390a5a28d2b87:13941ReactMount.render
@ react.browserify.js?345ed1d2c9fb8e823a80b4ddddc390a5a28d2b87:12788ReactPerf.measure.wrapper
@ react.browserify.js?345ed1d2c9fb8e823a80b4ddddc390a5a28d2b87:13941(anonymous function) @ react_layout.js:42jQuery.Callbacks.fire
@ jquery.js:3143jQuery.Callbacks.self.fireWith
@ jquery.js:3255jQuery.extend.ready
@ jquery.js:3467completed

from react-dropzone-component.

felixrieseberg avatar felixrieseberg commented on August 30, 2024

Hey everybody, thanks for waiting - I know finally have it figured out. Dropzone.js requires that the Dropzone element is a <form> with the action attribute set - that's why y'all ran into errors. I just pushed an update (0.5.0) that is capable of doing just that. To use, use the component like so:

var componentConfigWithoutPostUrl = {
    allowedFiletypes: ['.jpg', '.png', '.gif'],
    showFiletypeIcon: true,
};
React.render(
    <DropzoneComponent config={componentConfigWithoutPostUrl} 
                       eventHandlers={eventHandlers}
                       action="post.php"
                       djsConfig={djsConfig} />, 
    document.getElementById('content')
);

I will be closing this in the meantime. Thanks to @appshore, @jasecoop and @mtando for reporting, you rock!

from react-dropzone-component.

kand617 avatar kand617 commented on August 30, 2024

Hello,

I have issues. I believe I have followed what was shown.
Adding the action ends up invoking the http call.....

This what I have

getFileInput(){
    var componentConfig = {
      iconFiletypes: ['.jpg', '.png', '.gif'],
      showFiletypeIcon: true
      // Notice how there's no postUrl set here
    };
    var handlers = {
      drop:this.fileDropped
      // Notice how there's no postUrl set here
    };
    // Add params to your dropzonejs configuration object, like so:
    var djsConfig = {
        addRemoveLinks: true,

    };


     return <DropzoneComponent 
     config={componentConfig} 
     eventHandlers={handlers} 
      action="post.php"
     djsConfig={djsConfig}


    />
  }

It renders fine, but once I hover over it I get this
upload error

With the console message:
POST http://localhost:8000/post.php 404 (Not Found)

from react-dropzone-component.

qiuwei avatar qiuwei commented on August 30, 2024

There is a side effect of having action attribute in the Dropzone Component, the component doesn't pick up the css styles anymore.

from react-dropzone-component.

lopezjurip avatar lopezjurip commented on August 30, 2024

I'm having the error as @kand617, it's automatically POSTing when I don't want to.

from react-dropzone-component.

Related Issues (20)

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.