Unable to upload file

I have upload a test file.

The App_ID=85640F83-1394-1E16-FFF8-1DCE458CAE00

The returned URL from the API call is:
{“fileURL”:“https://api.backendless.com/85640f83-1394-1e16-fff8-1dce458cae00/v1/files/U2/Hints/MyTestFile.txt”}

Thanks, Roy. We’re investigating it. Please do not delete anything in /U2/

Mark

Thanks, I Will not delete /U2.

NOTE: In addition, I have now seen this same problem when using the Logging API. The call to the API returns successfully and when you look at the logging directory there isn’t a log file at all.

Hi Roy!

I can reproduce this issue with following request:

curl -H application-id:xxx -H secret-key:xxx -H Content-Type:application/octet-stream -X POST -F "file=@test.jar" "https://api.backendless.com/v1/files/U2/Hints/testFile.txt"

But when I set Content-Type:multipart/form-data upload works as expected:

curl -H application-id:xxx -H secret-key:xxx -H Content-Type:multipart/form-data -X POST -F "file=@test.jar" "https://api.backendless.com/v1/files/U2/Hints/testFile.txt"

Could you try it?

curl -H application-id:xxx -H secret-key:xxx -H Content-Type:application/octet-stream -X POST -F "file=@test.jar" "[url=https://api.backendless.com/v1/files/U2/Hints/testFile.txt%22]https://api.backendless.com/v1/files/U2/Hints/testFile.txt"[/url];

When I issue this command I get the following error:
{“code”:6006,“message”:"Page contains prohibited symbols: /U2/Hints/testFile.txt%3B "}

I also get the same error for running the second command with the form-data.

The problem was the trailing “;” which isn’t needed in the curl commands.

The first request works returning a fileURL but when you go to the Backendless console and navigate to the /U2/Hints directory, the directory is empty.

I tried the curl request with the form-data and it works. I tried it 2 times now and it returns witha fileURL and also it shows up in the console. In addition, when you select the file in the console it opens up without an error like before.

I tried it with a larger file in both cases (~11MB) and both return success but the file doesn’t exist in the console even after making sure to refresh the console window.

Created a new application and still the same behavior of the File Upload problem.

Is this still in app id: 85640F83-1394-1E16-FFF8-1DCE458CAE00 ?

Mark,

Yes the app Id is: 85640F83-1394-1E16-FFF8-1DCE458CAE00

Roy,

I should’ve asked for it in the first place… Our admin is asking what is there URL of the file that does not open. Could you please let me know that too?

Regards,
Mark

I will POST another file and respond with the file URL from the response.

The file URL that I just posted is: {“fileURL”:“https://api.backendless.com/85640f83-1394-1e16-fff8-1dce458cae00/v1/files/U2/Hints/MyTestFile.txt”}

When I check for file existance using the file dir. listing API, I get this error message: {“code”:6007,“message”:“The specified resource was not found”}

I tried uploading to a new directory using the REST API and it has the same problem.