Unable to Upload File – "Oops! Something went wrong. Please reload the page and try again."
Hi everyone,
I recently installed the FoF Upload extension and configured it to allow specific MIME types for file uploads. However, when I try to upload a 322KB ZIP file, I get the following error:
"Oops! Something went wrong. Please reload the page and try again."
Here’s what I’ve done so far:
MIME Type Configuration:
In the extension settings under "Configure your mime type, upload adapter mapping", I’ve added the following regex to allow various file types, including ZIP files:
Copy
^application\/(x-(7z|rar|zip)-compressed|zip|gzip|arj|x-(bzip2|gzip|lha|stuffit|tar)|pdf|msword|vnd.openxmlformats-officedocument.wordprocessingml.document|vnd.ms-excel|vnd.openxmlformats-officedocument.spreadsheetml.sheet|vnd.ms-powerpoint|vnd.openxmlformats-officedocument.presentationml.presentation)
File Size:
The ZIP file I’m trying to upload is only 322KB, which is well below the configured limits (upload_max_filesize and post_max_size are both set to 100MB in my PHP configuration).
Permissions:
I’ve checked the upload directory permissions, and the web server user (www-data) has write access to the directory.
What I’ve Tried:
Reloading the page and trying again (as suggested by the error message).
Uploading smaller files (e.g., a pdf file) – this works fine.
Questions:
Could this issue be related to the MIME type configuration?
Are there any additional settings I need to adjust in the FoF Upload extension?
Could this be a server-side issue (e.g., PHP or Nginx configuration)?
Any help or suggestions would be greatly appreciated!
Thanks in advance!
Additional Information:
Flarum Version: 1.8.9
FoF Upload Version: 1.7.0
Server: Nginx with PHP 8.2.27
Logs: No specific errors in the Nginx or PHP logs related to this issue.
Let me know if you need more details!
Flarum information
Flarum Version: 1.8.9