You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Normal single uploads via name="photo" seem to work, but when you enable multiple by using name="photos[]" (but still only upload one file) the $_FILES array looks to be inverted.
And related, when I try to upload more than one file at a time, the browser hangs as (pending) with this error from wp-now.
Trace: TypeError: Cannot read properties of undefined (reading 'buffer')
at Object.arrayBuffer (file:///Users/christoph/.nvm/versions/node/v20.8.1/lib/node_modules/@wp-now/wp-now/main.js:894:46)
at #dispatchToPHP (/Users/christoph/.nvm/versions/node/v20.8.1/lib/node_modules/@wp-now/wp-now/node_modules/@php-wasm/node/index.cjs:68550:45)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async PHPRequestHandler.request (/Users/christoph/.nvm/versions/node/v20.8.1/lib/node_modules/@wp-now/wp-now/node_modules/@php-wasm/node/index.cjs:68484:14)
at async PHPBrowser.request (/Users/christoph/.nvm/versions/node/v20.8.1/lib/node_modules/@wp-now/wp-now/node_modules/@php-wasm/node/index.cjs:68326:22)
at file:///Users/christoph/.nvm/versions/node/v20.8.1/lib/node_modules/@wp-now/wp-now/main.js:908:15
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
The text was updated successfully, but these errors were encountered:
If you upload one file, it'll show the (inverted) array. It fails on multiple uploads though. To see that error, I was testing locally on wp-now and viewing the wp-now start terminal output. You can download the plugin here)
Removes the custom file upload handler and rely on PHP body parsing
to populate the $_FILES array. Instead of encoding the body bytes as
a string, parsing that string, and re-encoding it as bytes, we keep
the body in a binary form and pass it directly to PHP HEAP memory.
Closes#997Closes#1006Closes#914
## Testing instructions
Confirm the CI checks pass (it will take a few iterations to get them right I'm sure :D)
Normal single uploads via name="photo" seem to work, but when you enable multiple by using name="photos[]" (but still only upload one file) the $_FILES array looks to be inverted.
It should be [photos][name][0] not [photos][0][name]
And related, when I try to upload more than one file at a time, the browser hangs as (pending) with this error from wp-now.
The text was updated successfully, but these errors were encountered: