Make WordPress Core

Changes between Version 2 and Version 3 of Ticket #47987, comment 16


Ignore:
Timestamp:
09/27/2019 05:50:19 PM (7 years ago)
Author:
azaozz

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #47987, comment 16

    v2 v3  
    2828> The REST API supports `$_FILES` or passing the data in the request body. So it should be possible to do a direct POST.
    2929
    30 Yeah, the question is how the binary data gets to the PHP `$_FILES` array. A `multipart/form-data` request outside the API?
    31 
     30Yeah, the question is how the binary data gets to the PHP `$_FILES` array. A `multipart/form-data` request outside the API? In all other cases it seems the client (js in the browser) will have to "deal" with the uploaded before sending it. I think in some cases it will load the whole file in memory which may be the reason uploads fail more often through the API.