The local lnmp test environment file is uploaded successfully. after the code is moved to the build environment, the following error occurs: thefiletypeyouareattemptingtouploadisnotallowed. Google has found the solution after N years.
CodeIgniter file upload error: the filetype you are attempting to upload is not allowed
The local lnmp test environment file is successfully uploaded. after the code is moved to the build environment, the filetype you are attempting to upload is not allowed error is prompted. Google has not found a solution after N years.
There are some possible causes for the filetype you are attempting to upload is not allowed error on the network:
1. rename the configuration item to remove it.
2. duplicate names without suffixes
.....
Final Solution:
Before modification:
$ Config ['allowed _ types'] = 'jpg | gif | png | jpeg | bmp ';
After modification:
$ Config ['allowed _ types'] = '*';
Final Upload configuration item:
$ Config ['upload _ path'] = $ save_path; $ config ['allowed _ types '] = '*'; $ config ['File _ name'] = "your userid).png"; $ config ['overwrite'] = true; $ this-> load-> library ('upload ', $ config );
You can change the allowed Upload type to *, which may cause some security problems.