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
I'm running wpapi in an express server and want to upload a Buffer from Express.Multer.File data. The docs say the file() method can accept a Buffer when added I get the error: Argument of type 'Buffer' is not assignable to parameter of type 'string | File'. Type 'Buffer' is missing the following properties from type 'File': lastModified, name, webkitRelativePath, size, and 4 more.ts(2345
Here is my setup:
I'm console logged buffer to make sure it is in fact a Buffer and I get buffer: <Buffer ff d8 ff e0 00 10 4a 46 49 46 00 01 01 00 00 01 00 01 00 00 ff db 00 43 00 03 02 02 03 02 02 03 03 03 03 04 03 03 04 05 08 05 05 04 04 05 0a 07 07 06 ... 70963 more bytes>,
The text was updated successfully, but these errors were encountered:
I'm running
wpapi
in an express server and want to upload a Buffer fromExpress.Multer.File
data. The docs say thefile()
method can accept a Buffer when added I get the error:Argument of type 'Buffer' is not assignable to parameter of type 'string | File'. Type 'Buffer' is missing the following properties from type 'File': lastModified, name, webkitRelativePath, size, and 4 more.ts(2345
Here is my setup:
I'm console logged
buffer
to make sure it is in fact a Buffer and I getbuffer: <Buffer ff d8 ff e0 00 10 4a 46 49 46 00 01 01 00 00 01 00 01 00 00 ff db 00 43 00 03 02 02 03 02 02 03 03 03 03 04 03 03 04 05 08 05 05 04 04 05 0a 07 07 06 ... 70963 more bytes>,
The text was updated successfully, but these errors were encountered: