Backendless Support
 
In Progress

v4 Codeless File API Question

Hey!

Quick question - I have a third-party form that does a POST into one of my backendless API functions as a webhook, and it provides a link to a file in the JSON payload.

I would like to have that file stored in backendless so I can do some linkages on it. Is there a way to "download" contents of that image via the provided link in the JSON (say, in base 64), then use the existing codeless blocks to "upload" the file content to backendless? I think not, and thought of doing a GET on the file's URL, but don't think that will work, as the format would not be in b64?

Any suggestions? If that's not currently possible, it's no big deal as I can do this manually, but just wanted to check if there is a current way to streamline this with the existing file API / block functionality :)

Thanks,

Renato

Leave a Comment

Comments (5)

photo
1

Hi Renato,

I have not tried it, but I imagine it should be something along these lines (umm, blocks):

ed5effa5d135a1727b9b85c3f7af4171

photo
1

Hi Mark,

Just tried it out, and the file is created, but is unreadable with the data passed in from the GET :( .

Thanks anyway!

R

photo
1

What is the format of the file? Do you have a URL you could share?

photo
1

I actually just created a quick test service that did exactly what you outlined above, with the URL being just a simple PNG (I didn't bother plumbing it into my API service / getting from the webhook JSON)

For example, if you use the backendless logo for example, it does the same:

  1. https://backendless.com/wp-content/themes/backendless/img/logo.png

File is created, but "blank".

photo
photo
1

I have created a ticket for this issue BKNDLSS-15986. We will notify you when it will be fixed.