Opened 20 months ago
Last modified 20 months ago
#58513 new defect (bug)
Uploading JSON file of 1MB or less fails to upload
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 6.2.2 |
Component: | Upload | Keywords: | |
Focuses: | Cc: |
Description
When uploading a JSON file of exactly 1048577 bytes or less leads to:
{filename} has failed to upload.
Sorry, you are not allowed to upload this file type.
Even though the file type is allowed. Tested with JSON file of valid JSON of 1048578 bytes (success) and 1048577 byes (failure).
Attachments (2)
Change History (3)
#1
in reply to:
↑ description
@
20 months ago
Replying to oliward@…:
Worth noting this was initially discovered on a multisite installation, but also tested on a fresh WP setup, non-multisite, after allowing JSON file upload with:
add_filter('upload_mimes', function ($mimes) {
$mimes['json'] = 'text/plain';
return $mimes;
});
When uploading a JSON file of exactly 1048577 bytes or less leads to:
{filename} has failed to upload.
Sorry, you are not allowed to upload this file type.
Even though the file type is allowed. Tested with JSON file of valid JSON of 1048578 bytes (success) and 1048577 byes (failure).
JSON file of arbitrary contents and size of more than 1 MB (1048578 bytes)