MantisBT - TestLink
View Issue Details
0008504TestLinkIntegration with Other Systemspublic2018-12-13 07:442018-12-13 17:02
nonefeature requestN/A
0008504: Integration with AWS S3 as File storage solution
I have made a stub of this feature and so far everything looks fine. If you think it would be useful, I can PR it and discuss some implementation details.
No tags attached.
Issue History
2018-12-13 07:44cyusteNew Issue
2018-12-13 15:41fmanNote Added: 0028319
2018-12-13 17:02cyusteNote Added: 0028320

2018-12-13 15:41   
please details here implementation details

2018-12-13 17:02   
I inluded aws-cli and doctrine-cache to thirdparty
Doctrine cache is recommended to speed up s3 interactions

aws-cli is loaded in lib/functions/tlAttachmentRepository.class.php

Added a new option in config_inc
 $g_repositoryType = TL_REPOSITORY_TYPE_S3;

and three parameters to configure this mode: bucket (mandatory) and key/secret (optional)

Finally, created all the equivalent functions to upload/download files from FS in S3 in tlAttachmentRepository.class.php
This is not ideal, as files will be first downloaded to the server and then sent to the client, but this is the only way I found to keep file access secured

Files are stored in S3 in root path, no folders are created. It can be done but I don't see any advantage