Comments (10)
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.
@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.
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.
Hi Felix, i still got this issue using React-Dropzone-Component v 0.4.4.. could you please advise? Thanks
from react-dropzone-component.
Well, we'll reopen the issue, that's for sure ;-) Let me give it a try - I'll report back.
from react-dropzone-component.
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.
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.
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
With the console message:
POST http://localhost:8000/post.php 404 (Not Found)
from react-dropzone-component.
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.
I'm having the error as @kand617, it's automatically POSTing when I don't want to.
from react-dropzone-component.
Related Issues (20)
- How to restrict image upload size to 5MB
- Allow to upload only pdf files works on desktop but doesn't work on mobile phone's?
- What is the correct latest version? HOT 2
- React 16 migration (lifecycle methods) HOT 3
- Params do not works HOT 2
- How do I append file(s) to formData? HOT 1
- I need to set withCredentials property to true. How can I do that using provided API?
- How can we updated group permissions using PNP HOT 5
- Trigger success indicator (checkmark) appear when using 'no-url' option
- how get upload progress value in djsConfig
- findDOMNode is deprecated in StrictMode.
- Unable to set dynamic acceptedFiles in react-dropzone-component HOT 2
- next/image is not working with react-dropzone-component
- Pass more parameters in useDropzone
- how to set inital files HOT 2
- Upload .pptx file using Dropzone
- 'DropzoneComponent' does not have any construct or call signatures HOT 2
- Inappropriate file formats are attached on the android phone HOT 1
- Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
- Issue with disabling drag and drop functionality
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-dropzone-component.