30
Views
8
Comments
Solved
File  transfer
Question

Can we save the file on outsystem server other than in database? I want to save file on outsystem server as its a huge file so dont want to keep in DB. Is it possible to save file at any physical path on outsystem?I need to save file on oustsytem cloud server and convert into encrypted string and send encrypted string as a API reponse. Now client should decrypt and able to get that file which we have kept on outsystem server. It could be like outsytem path where file is kept is a local path so client can also able to get that file.

Solution

Hi. Using the connector you have to specify the region constant instead of the system name. you will find a list here https://docs.aws.amazon.com/sdkfornet/v3/apidocs/items/Amazon/TRegionEndpoint.html

So instead ap-south-1 use APSouth1

Stefan

Solution

Hi.

The bucket name is the name you entered in the console when creating the bucket.

Key is a reference to an object (file). For example the key Folder1/MyPicture.png references a file MyPicture.png in the folder Folder1. I say folder, but in reality it is just a key that mimics a folder in the console. 

Stefan

Hi, there is the Filesystem Forge component you can use to interact with the filesystem https://www.outsystems.com/forge/component-overview/68/filesystem

My personal recommendation is however to avoid storing files in the filesystem and use an external store like S3 to store large files. 

Stefan

I have edited the question.Could you please suggest S3 would be the best solution for it or is there any local path on outsystem to save file.

Hi Ayesh,

i assume with client you mean a web application that uses an exposed OutSystems REST API endpoint. You can still use S3 as a filestore (or even the Filesystem forge component for local storage) to store the file. You can use CryptoAPI forge component to encrypt the binary data before saving it with a symmetric or asymetric key. In an exposed REST API you would then send the encrypted binary data to the client application. The client application then decrypts the data (using the shared symmtric key or the private key of an rsa key pair).

Best

Stefan

Hi Stefan,

I am trying to use S3 as local storage for everyone and from anywhere. getting an invalid region error after putting right region. Can you suggest what is the approach to connect S3 with outsystem and retrive file uploaded in S3 bucket

Screenshot 2023-11-09 121755.png
Screenshot 2023-11-09 121524.png
Solution

Hi. Using the connector you have to specify the region constant instead of the system name. you will find a list here https://docs.aws.amazon.com/sdkfornet/v3/apidocs/items/Amazon/TRegionEndpoint.html

So instead ap-south-1 use APSouth1

Stefan

Hey Stefan,

yes region error gone. Need one more help how can i get bucket key because the 1 i am adding to it thats giving me error "The specified key does not exist". 

Therefore need to know how can i get bucket key or if i can create bucket key?

Screenshot 2023-11-09 125203.png
Solution

Hi.

The bucket name is the name you entered in the console when creating the bucket.

Key is a reference to an object (file). For example the key Folder1/MyPicture.png references a file MyPicture.png in the folder Folder1. I say folder, but in reality it is just a key that mimics a folder in the console. 

Stefan

Yes. It works.

Thanks Stefan

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