-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
File upload fails using REST API --data-raw
#8253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for opening this issue!
|
--data-raw
Related to parse-community/Parse-SDK-JS#1579 |
Fixed with parse-community/Parse-SDK-JS#1578 |
Before we close this issue, just to confirm, the issue only existed when using the former alpha version of the Parse JS SDK with Parse Server. Since Parse Server never used that alpha version of the SDK (not even in a pre-release version), it was never an issue that occurred in any version of Parse Server. Is that correct? |
Yes, that's right. |
Thanks for confirming. |
New Issue Checklist
Issue Description
Parse server throws the following error while uploading files:
The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined
Steps to reproduce
The issue could be reproduced using the following curl request for File upload Rest API:
Actual Outcome
The above request must respond with:
Expected Outcome
Successfully upload the file and respond with the URL to the file. A sample success response would be:
Environment
This issue occurs on the latest released version of parse-server 5.2.8, as well as in the latest alpha version 5.3.0-alpha.30.
Server
5.2.8
macOS Monterey
,Ubuntu 22.04.1 LTS
local
.Digital Ocean
Database
Postgres
PostgreSQL 14.1
local
, 'Digital Ocean'Client
Javascript
^3.5.0-alpha.6
Logs
error: Error creating a file: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined {"code":"ERR_INVALID_ARG_TYPE","stack":"TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined\n at new NodeError (node:internal/errors:393:5)\n at Function.from (node:buffer:328:9)\n at createHandler (/api/node_modules/parse-server/src/Routers/FilesRouter.js:167:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)"} error: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined {"code":130,"stack":"TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined\n at new NodeError (node:internal/errors:393:5)\n at Function.from (node:buffer:328:9)\n at createHandler (/api/node_modules/parse-server/src/Routers/FilesRouter.js:167:35)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)"}
The text was updated successfully, but these errors were encountered: