Cannot read property '_prepareToUploading' of undefined #1042

Open
opened 2018-08-06 20:57:12 +00:00 by geranim0 · 6 comments
geranim0 commented 2018-08-06 20:57:12 +00:00 (Migrated from github.com)

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)

ERROR TypeError: Cannot read property '_prepareToUploading' of undefined at FileUploader.uploadItem (eval at <anonymous> (main.bundle.js:1312), <anonymous>:100:14) at eval (eval at <anonymous> (main.bundle.js:3645), <anonymous>:85:32) at SafeSubscriber.schedulerFn [as _next] (eval at <anonymous> (main.bundle.js:89), <anonymous>:3996:36)
Mossy808 commented 2018-12-20 15:40:47 +00:00 (Migrated from github.com)

Did you figure this out?

Did you figure this out?
geranim0 commented 2018-12-20 15:55:28 +00:00 (Migrated from github.com)

No...

No...
VladBozhinovski commented 2020-08-07 18:22:01 +00:00 (Migrated from github.com)

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

@geranim0 a bit late but did you managed to fix this issue? I have similar to this one.
r-sw-eet commented 2020-08-12 08:38:50 +00:00 (Migrated from github.com)

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.

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.
geranim0 commented 2020-08-12 14:57:00 +00:00 (Migrated from github.com)

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 notifications@github.com
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
.

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 <notifications@github.com> 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> > . >
argelj289 commented 2020-10-18 16:03:47 +00:00 (Migrated from github.com)

does anybody still maintain this package?

this thread started 2018 and yet no solution

does anybody still maintain this package? this thread started 2018 and yet no solution
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dc/ng2-file-upload#1042