[wp-trac] [WordPress Trac] #58513: Uploading JSON file of 1MB or less fails to upload
WordPress Trac
noreply at wordpress.org
Mon Jun 12 11:24:11 UTC 2023
#58513: Uploading JSON file of 1MB or less fails to upload
--------------------------+------------------------------
Reporter: oliward@… | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Upload | Version: 6.2.2
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by oliward@…):
Replying to [ticket:58513 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).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58513#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list