-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uploading to incorrect URL #4
Comments
Do you really have two colons before port 8080 in your code?
In other words, by default, it's trying to find: I'm going to need a more complete stack trace than what you have provided. |
No there are not 2 colons. That's a typo, the url is generated from a Laravel route. I have the inside form tags, with the action set: <form method="POST" action="http://localhost:8080/media/upload" accept-charset="UTF-8" enctype="multipart/form-data">
<input name="_token" type="hidden" value="yYpUn8Ex5OyOIj1aA5xG3s4deDzJxC9mD3IBmhGD">
<input id="dropTarget" type="file" name="files" accept=".jpg, .jpeg, .png, .heic, .mp4, .mov, .mkv" class="hidden" multiple="">
</form> Here is the complete stack trace: (The lines in vendor.js correspond to jQuery)
|
Is the server responding with valid JSON? Since you are using chunked uploads, failure responses are delayed until the next request cycle due to how the underlying library works. So if it is failing on the last chunk but the server sent 'success' of false but didn't include either 'error' or 'errorcode', then that exception could trigger. If you could do a |
A request is never made to a valid URL, but the endpoint would return valid JSON. If I use the HTML above I get the stack trace posted. If I don't use the form tags or use |
If I set url to If I set url to |
The stack trace you posted indicates that the server is successfully responding to the request. However, since chunked uploads are in use, the data coming back is invalid (somehow). If you could do a |
I understand now. I am using a Laravel package for chunked uploads, and it was setup for {
"success" : true
} Do I have to use your "fancy_file_uploader_helper.php"? Or will it work with the same server side implementation that works for |
What response is expected after a successful chunk upload? |
For a discussion of blueimp's class, see issue #2 The response from a successful chunk upload should be the same. You don't have to use the helper class but you'll probably find it useful for solving common tasks. It is, as evidenced by its name, helpful for processing user input from Fancy File Uploader but it isn't required. |
If someone need my resolve. html
Getting fail response - current URL plus [object%20HTMLInputElement]. So, changed my html to: And this was solution. Endpoint response returns
|
I have also the error |
Testing our your uploader with the following:
This generates the error
http://localhost:8080/product/4/[object%20HTMLInputElement]
, which is the current URL plus[object%20HTMLInputElement]
.Changing configuration to:
Results in
Uncaught TypeError: Cannot read property 'replace' of undefined
at:jquery-fancyfileuploader/fancy-file-uploader/jquery.fancy-fileupload.js
Line 14 in 8ddd6c2
The text was updated successfully, but these errors were encountered: