File Upload REST API returning 200 OK withe empty response

Since 04/25 File Upload API was not uploading files using File API service with custom domain.

The client application which is a custom mobile app was not updated. The usage is the same as your documentation whe using custom domain.

We cheked the application was working by sending the file without the name in the URL unti 04/24. Now it returns 200 OK without response when that happens. We fixed the filename in the URL. It is possible to recover files as the server was erroneusly returning 200 status code?

Hello @Edwin_Santos

Did you use overwrite flag for file uploading?

Regards, Dima

No, what we did was erroneusly sent withouth the name on URL

Could you provide an example of a request(need only URL) that has no file name, but returns 200?

Unfortunately, I can’t reproduce it by myself.

Sample: Just leave the file name out in the URL:

curl -H Content-Type:“multipart/form-data” -H user-token=“XXXXX” --form upload=@sample.txt -X POST http://xxxx.backendless.app/files/txtfiles/

When a file name is not specified, but a path exists, the API call is handled as “directory creation”. In this case, we return 200.

In summary, we have three basic workflows for this route:

  1. Path provided without filename(with slash at the end) - we create a directories from a path
  2. Path and file name not provided - we catch an error
  3. Path and file name provided - we create a file from the payload, and directories if they are present in the path.

Regards, Dima.

The problem is that it was creating the file submitted until 04/24, maybe due to some change on your side. And maybe it is best to return an error or create the file if an actual file is being submitted, even if the name is not provided. Unfortunately, I lost one full day’s worth of files because of this issue.