Hello folks!
have:
- js application + axios + post request w/ multipart form data (3 binaries: audio/photo/video) and some string key:values
- parse server w/ predefined schema for my classes/MyClass
can i upload all files via post on classes/MyClass ? or i need to use parse/files API that map uploaded files w/ class object? currently i am getting
SyntaxError: Unexpected token - in JSON at position 0 at JSON.parse (<anonymous>) at createStrictSyntaxError (/parse/node_modules/body-parser/lib/types/json.js:158:10) at parse (/parse/node_modules/body-parser/lib/types/json.js:83:15) at /parse/node_modules/body-parser/lib/read.js:121:18 at invokeCallback (/parse/node_modules/body-parser/node_modules/raw-body/index.js:224:16) at done (/parse/node_modules/body-parser/node_modules/raw-body/index.js:213:7) at IncomingMessage.onEnd (/parse/node_modules/body-parser/node_modules/raw-body/index.js:273:7) at IncomingMessage.emit (events.js:197:13) at IncomingMessage.EventEmitter.emit (domain.js:439:20) at endReadableNT (_stream_readable.js:1129:12)
------------------_
detailed steps to reproduce
Headers:
Accept: application/json, text/plain, */*
Accept-Encoding: gzip, deflate
Accept-Language: ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7
Connection: keep-alive
Content-Length: 9867817
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryFmmWJBgVHEejBT6E
Host: 0.0.0.0:1337
Origin: http://0.0.0.0:8080
Referer: http://0.0.0.0:8080/
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36
X-Parse-Application-Id: app-backend
X-Parse-MASTER-Key: XXXX-MY-KEY-1d429d4248c7-f15287d1-f5f8-47a9-b69e-4514c7bb9991
form data
title: sadsad
owner: asdasd
video: (binary)
photo: (binary)
audio: (binary)
revealDate: 2020-09-26
general:
Request URL: http://0.0.0.0:1337/parse/classes/MyClass
Request Method: POST
Status Code: 400 Bad Request
Remote Address: 0.0.0.0:1337
Referrer Policy: no-referrer-when-downgrade
response:
{"error":"Unexpected token - in JSON at position 0"}
sorry if its dummy question i am Newby in parse) thanks in advance!