Good day.

 

Creatio has S3 integration, so there must be a S3 client inside. 

Where i can find it? Or any other possibilities to put file inside the current file storage.

 

In documentation i find example of storage implementation, witch i dont need because it is already contains S3 file storage integration.

https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/back-end-development/api-for-file-management/examples/implement-a-file-content-storage

 

And a file data saved directly in database. This case is irrelevant too because im interested to put data in current storage (SysSetting ActiveFileContentStorage), not in database.

https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platfor…

 

Appreciate any help. Thanks.

Like 0

Like

1 comments

Hello,
 

Uploading or accessing existing files should be done through the API for file management. 
We encourage you to read the documentation on the API for file management on Creatio Academy.
Also, in the documentation there is an example for creating new files using the Terrasoft.File.Abstractions.IFileFactory interface.

 

IFileFactory
 

Thank you.

Show all comments

Hi  

we have Creatio Installed in our environment and confined to saving files in S3 instead of the database, now how I can get a stream of files saved in S3 inside the process script 

I used the below code when I saved the file in the Database :

ar userConnection = Get<UserConnection>("UserConnection");
Guid contactId = new Guid("4177bc0a-8cb1-4895-aacf-5932ed6b4cb5");
string base64String = "";
Select selectEmail = new Select(userConnection)
            .Top(1)
                .Column("Data")
            .From("ContactFile")
            .Where("ContactId").IsEqual(Column.Parameter(contactId)) as Select;
using (var dbExecutor = userConnection.EnsureDBConnection()) {
    using (IDataReader dataReader = selectEmail.ExecuteReader(dbExecutor)) {
        if (dataReader.Read()) {
            byte[] imageBytes = dataReader.GetColumnValue("Data") as byte[];
            base64String = Convert.ToBase64String(imageBytes);
        }
    }
}

can anyone help on how to get the image stream saved in S3?

 

Like 0

Like

1 comments

Hi,

 

You need to try approaches described in Stack Overflow here or in the AWS forum here.

 

Best regards,

Oscar

Show all comments