Hello im trying to create a method which allows the user to upload a file (e.g. an image) and some additional data as a multipart/form-data request. i would like to process the file and saving a reference into the database.
{"code":14004,"message":"Service invocation failed: Unexpected character ('-' (code 45)) in numeric value: expected digit (0-9) to follow minus sign, for valid numeric value\n at [Source: (ByteArrayInputStream); line: 1, column: 3]","errorData":{}}
An API service running in Backendless can accept requests only with the application/json Content-Type for POST and PUT requests. Sending multipart/form-data to an API service will not work. If you need to send a file, you’d need to encode the file contents in request body. There are several options for that, for instance, it can be a base64 encoded string or a byte array.
thanks a lot. just to be clear: any api service in backendless can only with the application/json Content-Type for POST and PUT requests, no matter if codeless or js service?