GithubHelp home page GithubHelp logo

murhafsousli / ngx-fire-uploader Goto Github PK

View Code? Open in Web Editor NEW
18.0 18.0 4.0 1.34 MB

Angular Fire Uploader

Home Page: https://stackblitz.com/edit/ngx-fire-uploader

License: MIT License

TypeScript 67.81% JavaScript 10.50% HTML 14.29% CSS 7.40%
dropzone file fire-storage firebase images storage uploader

ngx-fire-uploader's Introduction

ngx-fire-uploader's People

Contributors

beeman avatar murhafsousli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ngx-fire-uploader's Issues

Cannot upload any file other than image files with FireManager

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.

HTML:

  <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>

Component

  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);
  }

Module:

FireManagerModule.forRoot({
	extensions: {
	  pdf: 'url("assets/pdf.svg")' // url set up correctly 
	}
}),

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.