Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
File Upload always shows Uploading.... and never finished
This discussion is related to the fileupload addon.
Comments
Vanilla Forums COO [GitHub, Twitter, About.me]
// Open the socket
// Passing null username, generates a login popup on Opera (#2865)
if ( s.username ) {
xhr.open(type, s.url, s.async, s.username, s.password);
} else {
xhr.open(type, s.url, s.async);
}
Folder/File permissions - checked.
Tested in Firefox only at this point.
Found out that it is caused by the browser returning "<pre>{JSON response}</pre>" instead of "{JSON response}" as the iframe document body's innerHTML which is then deemed "Invalid JSON" by the JQuery JSON parser - and so even the initial checkupload test doesn't work. Solution was as simple as
Response = Response.replace(/^\<pre\>/gi, '').replace(/\<\/pre\>$/gi, '');
in the FileUpload javascript file in the UploadComplete function body just before it gets parsed by JQuery. That works at least in Firefox. In Opera it only got me one step further, where the upload itself should be finished - Opera error console says something like "Error: inline script compilation" and it appears that it cannot cope with the JSON data sent back from the server. This one will be harder to track because it does not show any trace.
Vanilla rocks! Peace to you all and thanks for this plug, Tim!
Dan
I manually created the blank file 'plugins/FileUpload/views/blank.php' and after that it worked.
greetz
broodaw
The path is wrong :
C:\fakepath\picture.JPG
*argl* getting a little sick of all these bugs, but i shouldn't because i'ven't paid for the work.
Let me know if you need any further details.
Cheers
Browsers: Mozilla Firefox, Opera, Chrome.
Rights to /forum 777.
When i try to debug as advised @cdavid, my FireBug console is empty.
Version of Vanilla?
Rewrite URLs on?
Server software and version?
APC installed?
Vanilla Forums COO [GitHub, Twitter, About.me]
FileUpload - 1.4.0
Vanilla - 2.0.11
Mod Rewrite ON
Server soft:
1. Ubuntu Ubuntu 4.4.3, php 5.3, apache 2.2
2. Debian 4.3.5, php 5.3, apache+nginx
APC not installed
FileUpload 1.4.0
Vanilla 2.0.14
Rewrite On
CentOS Shared hosting trought godaddy
APC no! (dooh...)
To install APC, do this:
apt-get install php-apc
apache2ctl restart
APC is ON but progress bar is disabled because rfc1867 is disabled.
To enable it, do this:
edit /etc/php5/apache2/php.ini and add:
apc.rfc1867 = 1