File Upload to Third Party Sites and View Options

Hi Vlad, thanks for your helpful hints on return type in HTTP. When I try to run this in cloud console as ServerCodeUser as a Test type I get an “OK” but if I run it with “List of Bytes” I get an error saying “Custom business logic execution has been terminated because it did not complete in permitted time - 20 seconds”

I figure I should at least try to get a proof of concept showing how I can display files in the UI that are in your own file system without giving direct access before trying to get third party data. Do you know why this is happening? I am trying to haver ServerCodeUser use this API from you guys:

https://backendless.com/docs/rest/files_file_download.html

please provide your appId, I will take a look

Thanks, I sent you a PM in the system🙂

got it, thanks

I’ve create a test “test-files” UI Container, please open it in the preview mode and click on the button

It will load an image as base64 using API Service which loads a file from the backendless files

You were trying to load a big file which takes some time for reading and then to transfer the huge content to the client back, that’s why you can the task were failed with timeout

Thanks for taking a look. I am a typical business user who needs to exchange pdf excel and similar types of business files back and forth securely with clients. Is there no way to accomplish this task on this platform?

We’ve got many big companies that use Backendless for their business, and they use Files Service (including security policy) because Files is one of the most important areas in software engineering, so my answer is YES, it’s possible to implement what you want

Okay, great! I think it would be a pretty typical and simple scenario where an app would only allow the main developer/administrators of the app and the actual end client user to view files shared between the parties. Nobody else should be able to view these files through postman, etc., without permission.

On the UI side, the final end user of the app should be able to upload the files (and not accidentally be able to put it into another client’s private directory). The final end user of the app should also be able to download their file again later and also delete any files they uploaded in error or need to replace. The administrator should also be share files with the final client end user.

Are there examples anywhere of how to implement this solution on the Codeless/Backendless system? Are all the UI components equipped to handle this scenario at this time or do we need custom components?

I am hoping this thread will be helpful to those in the future who may be struggling to get this set up correct as well! It would be helpful to see an actual functioning app where we can log in with the various user roles to see how it reacts from a security standpoint to show how access can be denied.

Seems like you are looking for ACL permission for files when you can assign a particular permission for a specific user

https://backendless.com/docs/js/users_asset_container_permissions.html

https://backendless.com/docs/js/files_files_security.html

https://backendless.com/docs/js/file_permissions_api.html

At this moment we do not have a built-in component to select a file without uploading, but there is a ticket to add this.

so, for now, you can have a simple custom component for that,

in the following answer Alex described how to create it

1 Like

Each case might have a common pattern as well as uncommon, on public support we can assist you with a specific question but not with an entire solution. If you want to get extended support please contact us sales@backendless.com to discuss details

In addition, most of our Blueprints have roles/permissions configured, so you can research them (it’s free of charge) to find out how it works Backendless Marketplace | Backendless

not sure =)

the topic has name: “File Upload to Third Party Sites and View Options”
and there are mixed several topics about Files/Base64/Bytes/Codeless/ApiServices/UIBuilder/Roles/3rd PartyServices/etc

Okay, I agree this thread has gotten long but I think the ultimate answer is that what I was looking to accomplish isn’t likely possible without a lot of consulting and custom code at this time. Perhaps that will change as you guys build out.

As a side note this API on the bubble app is kind of what I was asking. It opens my salesforce file immediately because they have a “File” return type and it knows what to expect. It pulls together all those funny symbols and pops open my .pdf and every other file right open. There is also a file upload element.

Keep up the good work and building everything up. I like the codeless blocks you are putting together!