168
Views
2
Comments
Solved
[File Transfer Plugin] How to set up Server URL
Question
file-transfer-plugin
Mobile icon
Forge asset by OutSystems

Hi guys,


I need to transfer large data from client to server in chunks using FileTransferPlugin > UploadFileWithHeaders action.

However, I don't understand the server URL example: 

"https://" + GetDomain.Domain + "/FileTransferSample/rest/FileChomp/Chomp"

What is "/FileTransferSample/rest/FileChomp/Chomp"? When I paste the URL to the browser, I got a 404 File not found error. Is it the folder name pre-defined in the server? How can I set it up?


Is there any permission needed to set up from the IIS server to make it work? I think the user should have permission to upload it to the server. If yes, can you give me some instructions on how to do that?


My requirement is:

1. Transfer large file from client to server

2. After that, read binary content from the server and upload it to Google Storage


Thanks in advance!

UserImage.jpg
Dylan Heunis
Solution

Hi Minh,

The GetDomain.Domain is a JavaScript node that gets the current domain that the browser is running the application on. I.e. it should be the domain of the environment that you are using for the FileTransferSample application. For example my personal domain would be dylanheunis.outsystemscloud.com and this of course depends on the infrastructure you are using (the company's domain).

So when you go to the rest endpoint that would receive the file binaries in the example you would need to go to

https://<yourDomain>/FileTransferSample/rest/FileChomp

and the full URL for the POST method would be here

https://<yourDomain>/FileTransferSample/rest/FileChomp/Chomp


So you can go and create your own REST endpoint in your own application that works in a similar fashion to the Chomp method. Then when you receive the file in the endpoint you can use it in whatever manner you would like to send it to your Google Cloud Storage.

Or for testing purposes you can customize the endpoint in the FileTransferSample to test the capabilities of sending it to another API endpoint of your choice

UserImage.jpg
Minh Luong

Hi Dylan,


Thanks for your green light. I didn't notice there is a REST API called

/FileTransferSample/rest/FileChomp

I thought the file was transferred to that server URL and we need to read the content from that URL. My misunderstanding...


It's clear to me. Thanks!


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.