zefoy / ngx-dropzone-wrapper

Angular wrapper library for Dropzone
MIT License
174 stars 51 forks source link

how to pass filename on parameter #144

Open dineshmaths1 opened 4 years ago

dineshmaths1 commented 4 years ago

hii i want to pass upload file name as parameter like {filename:'1.png'}

mohsenmahoski commented 4 years ago

it's not a good way but solved my problem:

 @ViewChild("drzRef", { static: false }) myDropZone: ElementRef;

  onDrop(event) {
    event.preventDefault();
    const url ='someUrl' + myfileName;
    this.myDropZone.directiveRef.instance.options.url = url;
  }
    <dropzone #drz [config]="DEFAULT_DROPZONE_CONFIG" [message]="''" 
         (error)="onUploadError($event)"
         (success)="onUploadSuccess($event)" 
         (drop)="onDrop($event)" 
         (queueComplete)="queueComplete()"
         (processing)="onProcessing($event)" 
    >