S3-Uploader
S3-Uploader is a javascript library for uploading files from a browser to AWS S3, using parallel S3's multipart & non multipart uploads with MD5 checksum support and control over pausing / resuming the upload.
Adapted from +Fine uploader +EvaporateJS
This Javascript library Tweaked by adapting best features of Fine Uploader & EvaporateJS for max uploading speed to AWS S3 bucket
Installation
S3-Uploader is publiashed as a Node module
$ npm install uploader-s3
Otherwise, include it in your HTML:
Example
var MultipartUploaderRef;var BasicUploaderRef;var s3Details = {};var Promise = windowPromise;var PART_SIZE = 6 * 1024 * 1024; s3Detailss3bucket = null;s3DetailssignatureURL = null;s3DetailsawsRegion = null;s3DetailsaccessKey = null;uploadingFilesList$ = null; { s3Detailss3bucket = bucket; s3DetailssignatureURL = signer_url; s3DetailsawsRegion = region; s3DetailsaccessKey = access_key; MultipartUploaderRef = Uploaders3UploaderMultipart; BasicUploaderRef = request: endpoint: 'https://' + bucket + '.s3.amazonaws.com' accessKey: access_key objectProperties: bucket: bucket host: 'https://' + bucket + '.s3.amazonaws.com' { var file = uploadingFilesList$id; return filepath + '/' + fileawsKey; } region: awsRegion serverSideEncryption: true signature: endpoint: signer_url version: 4 resume: enabled: true autoUpload: true maxConnections: 100 chunking: enabled: false retry: enableAuto: true cors: expected: false sendCredentials: true callbacks: { var file = uploadingFilesList$id; filepercentage = ; fileprogressloaded = totalUploaded ? totalUploaded / 1048576 > 1 ? totalUploaded / 1048576 + 'MB' : totalUploaded / 1024 + 'KB' : '0KB' ; textfileprogressloaded + " of " + filereadableSize; } { if success var file = uploadingFilesList$id; file_promise; } { var file = uploadingFilesList$id; file_promise; } ; uploadingFilesList$ = ;} { BasicUploaderRef;} { if filesize > PART_SIZE return { MultipartUploaderRef; }; else return { file_promise = resolve: resolve reject: reject ; filepath = path + '/' + fileawsGuid + filefiletype; file { ; }; fileid = uploadingFilesList$length; uploadingFilesList$; BasicUploaderRef; }; }