This project was generated with Angular CLI version 8.0.0.
To be used in conjuction with Comdominios.
This project is an Angular library for handling secure direct to cloud uploads that are managed by the Condominios project. At CoTag Media we use it to handle all of our file ingestion as it:
- takes the load away from our API servers
- allows us to support hybrid cloud models
- works seamlessly with AWS Lambda and Google Cloud Functions
Effectively this project takes blob or file objects in the browser and
- Manages an upload queue with pause, resume and progress for each upload
- Supports configuring individual upload parallelism and the number of simultaneous uploads
- All files are hashed in webworkers before upload for data integrity
- Communicates with Condominios to obtain signed requests for the uploads
- Optionally bootstrap
MD5_WORKER_BASE
- this allows you to customise the path of the MD5 worker - Bootstrap the
MD5Workers
- these perform the hashing in webworkers and should only be instansitated once - In the components you wish to perform uploads, inject your
Http
service and theMD5Workers
- Import
UploadManager
and the storage providers you wish to useAmazon
,Google
,Azure
,OpenStack
- Add the providers to the upload manager:
UploadManager.addProvider(Amazon);
You can now use the manager
this.manager = new UploadManager(http, '/uploads', workers);
this.manager.autoStart = true;
// ...
// Add files to the upload manager
// Files is an array of Blobs or Files -> https://developer.mozilla.org/en/docs/Web/API/File
this.manager.upload(files);
Run gulp serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Run gulp build
to build the library. The build artifacts will be stored in the dist/library
directory. Use the --prod
flag for a production build.
Run ng test
to execute the unit tests via Karma.
You install the library from npm using npm install @acaprojects/ngx-uploads
;