ng2-file-upload icon indicating copy to clipboard operation
ng2-file-upload copied to clipboard

Cannot read property '_prepareToUploading' of undefined

Open geranim0 opened this issue 7 years ago • 6 comments

ERROR TypeError: Cannot read property '_prepareToUploading' of undefined at FileUploader.uploadItem (eval at (main.bundle.js:1312), :100:14) at eval (eval at (main.bundle.js:3645), :85:32) at SafeSubscriber.schedulerFn [as _next] (eval at (main.bundle.js:89), :3996:36)

geranim0 avatar Aug 06 '18 20:08 geranim0

Did you figure this out?

Mossy808 avatar Dec 20 '18 15:12 Mossy808

No...

geranim0 avatar Dec 20 '18 15:12 geranim0

@geranim0 a bit late but did you managed to fix this issue? I have similar to this one.

vbozhinovski avatar Aug 07 '20 18:08 vbozhinovski

me too...

ERROR Error: Uncaught (in promise): TypeError: Cannot read property '_prepareToUploading' of undefined
TypeError: Cannot read property '_prepareToUploading' of undefined
    at FileUploader.uploadItem (ng2-file-upload.js:723)

in combination with ngx-image-cropper, i want to use this method:

async reactToFinishedCropping() {
    if (this.croppingFinished) {
      //base64 to blob
      let blob = await fetch(this.croppedImage).then(r => r.blob());
      console.log(blob);
      //blob to file
      let file = new File([blob], "croppedImage");
      console.log(file);
      //file to fileItem
      let fileItem = new FileItem(this.uploader, file, {});
      console.log(fileItem);
      //start upload
      this.uploader.uploadItem(fileItem);
    }

apart from that i use ng2-file-upload with the same setting for uploader (except autoUpload: true) and it works. before uploadItem() i used addToQueue() & uploadAll(), but no reaction there at all.

r-sw-eet avatar Aug 12 '20 08:08 r-sw-eet

I never figured it out and quit the company because I could not stand doing front end anymore 😂😂

On Wed, 12 Aug 2020 at 04:39, connectedSoul [email protected] wrote:

me too...

in combination with ngx-image-cropper, i want to use this method:

async reactToFinishedCropping() { if (this.croppingFinished) { //base64 to blob let blob = await fetch(this.croppedImage).then(r => r.blob()); console.log(blob); //blob to file let file = new File([blob], "croppedImage"); console.log(file); //file to fileItem let fileItem = new FileItem(this.uploader, file, {}); console.log(fileItem); //start upload this.uploader.uploadItem(fileItem); }

apart from that i use ng2-file-upload with the same setting for uploader (except autoUpload: true) and it works. before uploadItem() i used addToQueue() & uploadAll(), but no reaction there at all.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/valor-software/ng2-file-upload/issues/1042#issuecomment-672736469, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADU32TDAFVXZQXLWGNNFX33SAJIKRANCNFSM4FOEJLLA .

geranim0 avatar Aug 12 '20 14:08 geranim0

does anybody still maintain this package?

this thread started 2018 and yet no solution

argelj289 avatar Oct 18 '20 16:10 argelj289