murhafsousli / ngx-fire-uploader Goto Github PK
View Code? Open in Web Editor NEWAngular Fire Uploader
Home Page: https://stackblitz.com/edit/ngx-fire-uploader
License: MIT License
Angular Fire Uploader
Home Page: https://stackblitz.com/edit/ngx-fire-uploader
License: MIT License
How can I add already uploaded storage item(s) to fire-manager
on page load?
We cannot create FileList object, need to make it to accept array of files
Currently, the file uploaded always gets a unique name, need the option to turn off this feature
such as images/img-xxx.jpg
Package Version: Latest
Node: v8.9.0
Angular: 6.2.3
[accept] = null
-> Can select / drop any file, but only image files are added.
[accept] = '.pdf'
-> Can select / drop any PDF file but nothing is added.
[accept] = '.jpg'
-> Can select / drop any JPG file but nothing is added.
<fire-manager #uploader
[showDetails]="true"
[showProgress]="true"
[uniqueName]="uniqueName"
[dropZone]="dropZone"
[multiple]="multiple"
[paramDir]="paramDir"
[paramName]="paramName"
[accept]="accept"
[parallelUploads]="parallelUploads"
[maxFilesCount]="maxFilesCount"
[maxFileSize]="maxFilesCount"
[thumbs]="thumbs"
[thumbWidth]="thumbWidth"
[thumbHeight]="thumbHeight"
[autoStart]="autoStart"
(files)="onFiles($event)"
(progress)="onProgress($event)"
(active)="onActive($event)"
(value)="onValue($event)"
(remove)="onRemove($event)"
(cancel)="onCancel($event)"
(reset)="onReset()"
(success)="onSuccess($event)"
(complete)="onComplete($event)"
(error)="onError($event)">
</fire-manager>
files = [];
links = [];
progress: FireUploaderProgress;
active = false;
uniqueName = true;
dropZone = true;
multiple = true;
paramName;
paramDir;
accept = null;
parallelUploads = 1;
maxFilesCount = 7;
maxFileSize = 5;
thumbs = true;
thumbWidth = 100;
thumbHeight = 100;
autoStart = true;
placeholder = 'Drop files here or click to select';
resizeWidth;
resizeHeight;
resizeMethod = ResizeMethod.Crop;
onFiles(e) {
this.files = e;
console.log('on files', e);
}
onSuccess(e: FileItem) {
console.log('on success', e);
}
onComplete(e) {
console.log('on complete', e);
this.links = e.map(file => file.downloadURL);
}
onProgress(e) {
console.log('on progress', e);
this.progress = e;
}
onRemove(e: FileItem) {
console.log('on remove', e);
}
onCancel(e: FileItem) {
console.log('on cancel', e);
}
onError(e) {
console.log('error thrown', e);
}
onReset() {
console.log('on reset', );
}
onValue(e) {
console.log('value', e);
}
onActive(e) {
this.active = e;
console.log('on active', e);
}
FireManagerModule.forRoot({
extensions: {
pdf: 'url("assets/pdf.svg")' // url set up correctly
}
}),
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.