Created
February 13, 2020 16:46
-
-
Save stemmlerjs/cc0766ad804ea89682aa08d60e8c67cd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export class AWSS3Uploader implements IUploader { | |
| private s3: AWS.S3; | |
| public config: S3UploadConfig; | |
| constructor(config: S3UploadConfig) { | |
| AWS.config = new AWS.Config(); | |
| AWS.config.update({ | |
| region: config.region || "ca-central-1", | |
| accessKeyId: config.accessKeyId, | |
| secretAccessKey: config.secretAccessKey | |
| }); | |
| this.s3 = new AWS.S3(); | |
| this.config = config; | |
| } | |
| async singleFileUploadResolver ( | |
| parent, | |
| { file } : { file: Promise<File> } | |
| ) : Promise<UploadedFileResponse> { | |
| // Todo next! | |
| return null; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment