I have a collection where I try to upload an Asset, a jpg file of 516kb.
The loader gets to a 100% but then the "Something went wrong." message appears.
The file is not stored in the uploads directory, it is however present in the storage/tmp directory.
I checked and the storage/uploads directory is writable.
PHP version: 7.2.11
Upload file size limit: 4M
Memory limit: 128M
Cockpit version: 0.8.3
OS: Debian 9 Stretch
Web server: Nginx
@drieshooghe check in the devtools network tab what response message you have for the upload request
@paoloamgomes I forgot to mention, the application returns a 500 error
sure, but what you have in the network tab response, check below:

just to understand if there is anything more about the error
@pauloamgomes


@drieshooghe I know you said that you have correct permissions, but just for be sure, give full permissions (including group and others - 777) on the storage/uploads folder and test again.


I still get the same result.
Yeah, was expecting that 馃槥 Do you can upload assets on the asset page?
Nope, no luck...
@pauloamgomes I resolved the issue.
The PHP GD extension wasn't installed correctly, which caused the problem.
All is well! Thank you for your help.
Perhaps the php GD extension is an idea for an additional check in the installer script?
@drieshooghe I'm having the same problem running Cockpit with the Dockerfile. What was wrong with GD in your setup? Maybe I have the same problem.
It gets worse. I run cockpit locally with the exact same docker compose file and uploading works.
Some more information:
This is the status code returned: 413 Request Entity Too Large
Strange, since the file being uploaded is barely 3MB and the .htaccess file sets the upload max size to 256M
Found the reason... Locally I'm accessing the cockpit instance directly, but on my remote server it's running behind nginx as reverse proxy. Something must have changed in the nginx config that limits the size of the upload files. I updated the nginx config and it all works now.
So for future ref this is how I dealt with it
Step 1 : go to bootstrap.php line 100 and set 'debug' = true, since my error was Call to undefined function finfo_open()
Step 2 : install fileinfo Universal Extensions if is not installed on your php
Step 3 : go to php.ini of your website and find extension=fileinfo and remove the ;
Step 4 : reload and restart php service on your server.
Now I can upload files. Cockpit still rules
Most helpful comment
@pauloamgomes I resolved the issue.
The PHP GD extension wasn't installed correctly, which caused the problem.
All is well! Thank you for your help.
Perhaps the php GD extension is an idea for an additional check in the installer script?