CakePHP-AjaxMultiUpload
CakePHP-AjaxMultiUpload copied to clipboard
File parameter missing
Hi there,
Thanks for this awesome plugin. However, I am having an issue with deleting some files. When I upload any file, it uploads properly but when deleting some files, it gives me "file parameter missing" but for other files, they delete fine. Not sure what the problem is. Eg. I uploaded two .png files that are of different file names, one of them deleted fine, the other raises the "file parameter missing" error.
Hope you can help me with this.
Thanks!
Hmmm, strange, I haven't seen this before. Do you notice anything specific about the files that can't be deleted? Spaces, special characters, etc? Anything odd about them? If you could send me a sample list of file names and which ones don't work, I can look into it and probably find out what happened.
I didnt notice anything specific about the files that can't be deleted. Not sure why they're behaving this way. Below is a sample list of the files that can and cannot be deleted.
Successful Delete: 3-Claytoncolour.pdf Database New.jpg timetable.pdf unit plan.pdf
Unsuccessful Delete: 3333-cl-bbis-2011.doc Issues List Description.doc Timetable Y3S1.jpg Y3S1 Exam Timetable.jpg jquery-ui-1.8.20.custom.zip qmanual.pdf Course Outline.jpg grid_timetable.xls Results.xlsx
Hi,
Have you had the chance of finding out what's causing the error? I still cant find what's wrong with it.
Cheers.
Yes, i got the same issue. It's only happening for the first file that i uploaded. The second and the rest of them are just fine
It's happening for random files for me. Be it second, third or fourth file uploaded.
I'm not sure if it's related or not, my view.ctp and edit.ctp are inside the plug in folder as i'm using this plugin for another plugin. Because i tried this on my local machine where the view and edit files are located in the default folder (app/view/.../view.ctp) and it all works just fine... And yeah, it's happening for random files as well for me
Anyone find anything about this problem?
Still not working for me. Not sure what else I can do. Sorry. =( I hope the author replies soon with a solution....
Can you guys do me a favor. In this file
$str .= "<a href='$delUrl'>Delete $baseEncFile</a> ";
And let me know whether the baseEncFile is empty for any of the files that have a problem? It looks like its not base64 encoding properly.
Sorry. Could you be more specific as to which lines I have to replace?
lines 34-35 for me is: if ($edit) { $baseEncFile = base64_encode ($file);
It shows something like this Delete RDpcV2Vic2l0ZXNcaWVccHJvamVjdDA4XHBlbm55aGVhbHRoLXYyXGFwcFx3ZWJyb290XFxmaW so i'm guessing this means baseEncFile is not empty
Hmmm, I think I know what is going on. Do you mind sharing the directory path that your files are on? That might have something to do with this. The root file directory might be too long, but I would like to confirm.
In the very first line of this plugin file: Controller/UploadsController.php, can you change is_null() to one of these two:
- (!isset($file))
- if ($file === null)
and see if that fixes the issue?
Yeah i think it's too long as well. This is the link ie.infotech.monash.edu.au/project08/pennyhealth-v2. Unfortunately, already tried those 2 codes but didn't fix the problem
Well, it's getting worse, now i can't delete any file i uploaded lol. Hmm i don't know if this got something to do with it. Everytime i tried to upload a file, the "Failed" message keep appearing even though it's successful
Hi srs81, I tried changing is_null to those two codes too. Still not working as well.
Jason , did you get the failed message as well when you uploaded a file? I got that for every files i uploaded
Hmmm. No. It works fine for me. There's no failed message.