Open bobbingwide opened 9 years ago
v1.0-beta.0422 now uses multipart forms to upload media. On my local servers this works fine. But on the hosted servers I've tried so far I'm still limited to approximately 2MB.
The next solution will have to try the REST API approach - upload the file first, then upload the rest of the attachment data in a subsequent call.
Issue not yet closed therefore.
A long time later... if we're going to upload the file first then we could use ftp to do it.
Happy Anniversary to this issue. 4 years today!
I'm still getting this problem when cloning larger attachments. e.g. cloning oik v3.3.3.zip to oik-plugins.co.uk The code still doesn't report the error.
oik-clone v0.6 added support for pushing the attachment post type and its associated media file. It uses a quick and dirty solution where the media file is part of the body of the POST request.
This works fine for small media files and for target servers where there is no limit imposed on the POST size. For larger media files it can lead to an HTTP 413 - Request Entity Too Large error code.
The code should be changed to use an approved method of uploading media files.
Short term workaround
Note: Some hosts have lower limits than others.
Proposed solution
Use a solution that's compatible with the WordPress REST API See http://wp-api.org/#media_create-an-attachment