Error 6002. Can't upload the file

Post is ready @mark-piller

Greetings, I have an issue with the uploading of files.

Firstly, I’ve uploaded a single file and it worked, but the API call ignored to create the “CampaignID” branch in the folder.

I needed:
/files/[path]/[campaignID]/[AdType]/[filename]
But I got
/files/[path]/[AdType]/[filename]

So, after uploading a single file, I’ve tried to upload 3 files using 3 API calls in 1 workflow, I’ve got an error that occurred when the 1st API call tried to go to Backendless:
sa

I also can’t find in your documentation how to insert a folder’s link to a certain field in the table using API calls.

Greetings @Volodymyr_Humnytskiy,

could you please show us a code snippet how you build a request?

If you created a FILE_REFERENCE column, then you just need to set the url string in this field. Under the hood, it’s just a string column (string data type), the difference between a regular string column and a file column can only be seen in the console (link directly to the file for your convenience).

Regards,
Stanislaw

@stanislaw.grin


URL: https://api.backendless.com/[application-id]/[REST-api-key]/files/[path]/[campaignID]/[AdType]/[filename]?overwrite=true

Hello @Volodymyr_Humnytskiy

I just checked it and seems like everything works properly

could you please provide us a CURL of the request

Regards, Vlad

Don’t forget about my second problem. Files are not uploaded.

try to use Postman, you can import our API collection here

I don’t have postman

I don’t know how to use it

I am not sure I can help you without seeing the request details, I checked your case and I do not see any issues from our side. so the problem might be how you send the request, for instance on your screens the parameters “compaignID | filename | AdType” are empty

Can I write all parameters right here so no of them are empty. Would you be able to help me?

would be more useful to see the entire request, including URL, headers and requestBody, and the best way is to see a cURL

what’s name of the app you use for composing this request?

Adstronomic

Here I have NO empty values.


user-token: 549A865C-8E9E-45A6-A72C-D823262E278B

https://api.backendless.com/[application-id]/[REST-api-key]/files/[path]/[campaignID]/[AdType]/[filename]?overwrite=true

[path], [campaignId], [AdType], [filename] are simple strings.

Do you need REST api key and application key?

I think I’ve given you enough data.

I can’t run Postman, because there I can’t upload a file. As you see in my screenshot, I’ve uploaded a file.

@vladimir-upirov

could you please provide a link to this software Adstronomic, because I can’t find it.

I can’t run Postman, because there I can’t upload a file. As you see in my screenshot, I’ve uploaded a file.

why you can’t? on this screen, I successfully uploaded a file Error 6002. Can't upload the file - #5 by vladimir-upirov

how to upload a file into the input?

alright, how can I reproduce your problem in the app?

  1. Sign Up
  2. Go to ‘Create Campaign’
  3. Press “Get Started” and start the creation of the campaign.
    There are 4 screens to fulfill data. When you would reach the ‘75% progress bar’ page, you would see there FileUploaders. Try to upload files and tap ‘Next’ or ‘Save as draft’

You would replicate the bug, go to my account in Backendless, Files section, you would see that directory(file path) is not correct.

what’s your appId?