Skip to content

Instantly share code, notes, and snippets.

@stemmlerjs
Created February 13, 2020 16:46
Show Gist options
  • Select an option

  • Save stemmlerjs/cc0766ad804ea89682aa08d60e8c67cd to your computer and use it in GitHub Desktop.

Select an option

Save stemmlerjs/cc0766ad804ea89682aa08d60e8c67cd to your computer and use it in GitHub Desktop.
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