Closed lshaf closed 7 years ago
It means http://php.net/manual/en/function.move-uploaded-file.php returned FALSE. There could be several reasons for that, so you have to do some debugging.
You say the folder is 770, but what are the UID/GUID of the folder? If either of them is your webserver user, the webserver doesn't have write rights.
[SOLVED] Nah, it seems the main problem isn't there. however my uploaded file has been processed for twice and it make upload container contain 2 same files. Because of that, when I move the first array it's success but the second one is fail. that's caused the error.
I just fix it by turn of "auto_process" on config/upload.php
Yup, when auto_process
is active, you shouldn't call Process()
manually. This behaviour is documented: https://fuelphp.com/docs/classes/upload/usage.html#/method_process
Well, since I use my own config on there. I think I have no reason to write it again on file config 😕
$config = array(
'auto_process' => false,
'path' => $path,
'overwrite' => true,
'new_name' => "tmpcsv_teacher",
'auto_rename' => false,
'ext_whitelist' => array('csv'),
);
btw Is there any reason that you make 'auto_process' when I init upload data by calling process? I just feel like it's no sense when you call "Process" to init the upload but you do that "Process" again.
Not a problem, just make sure "auto_process" is disabled.
It is enabled by default for backward compatibility reasons, the package is used in the Fuel v1 framework as well, and there this behaviour was default.
I always got message "Unable to move the uploaded file to it's final destination" when I upload Here is my code
I'm using latest version 2.0.6 and my folder is 770 My PHP is version 5.6/ I have no idea about this, I didn't found any threat on internet about this 😖