Adding additional parameters to queue #900

Closed
opened 2017-10-04 16:12:20 +00:00 by stephenad · 4 comments
stephenad commented 2017-10-04 16:12:20 +00:00 (Migrated from github.com)

Hi

Currently in queue / FileItem / file you have the parameters Name, Size and Type, please can someone explain how I can add more parameters into this as I need to store "year" and "Business Type" against the file as well.

Thanks
Andy

Hi Currently in queue / FileItem / file you have the parameters Name, Size and Type, please can someone explain how I can add more parameters into this as I need to store "year" and "Business Type" against the file as well. Thanks Andy
AckerApple commented 2017-10-05 13:20:25 +00:00 (Migrated from github.com)

I assume you can't add parameters because of type checking, correct?

Because in JavaScript you can add any property to just about any variable.

If type checking be yo enemy, I always use bracketed variables to scoot around the type checking. Example object['myUntypedVarName'] = 33

More info if I am wrong. How can you not add a property to a variable?

I assume you can't add parameters because of type checking, correct? Because in JavaScript you can add any property to just about any variable. If type checking be yo enemy, I always use bracketed variables to scoot around the type checking. Example `object['myUntypedVarName'] = 33` More info if I am wrong. How can you not add a property to a variable?
stephenad commented 2017-10-05 13:30:19 +00:00 (Migrated from github.com)

Hi Acker,

Thanks for the reply, I am relatively new to Angular Type script so may just not be understanding things properly.

I have inherited this system from an old colleague and it is a bit all over the place which is not helping.

This is what I have, at the moment, so I can set the three options on the left then click choose file button select the file(s), then it uploads the file(s) to the table on the left but I am not understanding how to put my 3 values into the choose file array (uploader.queu) so I can output then onto the table. As the for loop only looks at the uploader.queue array.

Following on from the files being put on the table, I will then need to click create zip (still to get this working with angular and jszip) file and depending on the Business Class and Renewal Classification the files would be put into sub folders of the zip file, hence the reason for know the information about the files when they are uploaded.

Hope I have explained what I am trying to achieve a better.

Thanks in advance.
Andy
[cid:image001.png@01D33DE6.714695A0]

From: Acker Dawn Apple [mailto:notifications@github.com]
Sent: 05 October 2017 14:20
To: valor-software/ng2-file-upload ng2-file-upload@noreply.github.com
Cc: Andrew Stephen andrew.stephen@mtg.im; Author author@noreply.github.com
Subject: Re: [valor-software/ng2-file-upload] Adding additional parameters to queue (#900)

I assume you can't add parameters because of type checking, correct?

Because in JavaScript you can add any property to just about any variable.

If type checking be yo enemy, I always use bracketed variables to scoot around the type checking. Example object['myUntypedVarName'] = 33

More info if I am wrong. How can you not add a property to a variable?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/valor-software/ng2-file-upload/issues/900#issuecomment-334462465, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AdRpzuGcYTbOg9y5ZfTzqa9oK500JuIoks5spNebgaJpZM4Pt3j1.

Hi Acker, Thanks for the reply, I am relatively new to Angular Type script so may just not be understanding things properly. I have inherited this system from an old colleague and it is a bit all over the place which is not helping. This is what I have, at the moment, so I can set the three options on the left then click choose file button select the file(s), then it uploads the file(s) to the table on the left but I am not understanding how to put my 3 values into the choose file array (uploader.queu) so I can output then onto the table. As the for loop only looks at the uploader.queue array. Following on from the files being put on the table, I will then need to click create zip (still to get this working with angular and jszip) file and depending on the Business Class and Renewal Classification the files would be put into sub folders of the zip file, hence the reason for know the information about the files when they are uploaded. Hope I have explained what I am trying to achieve a better. Thanks in advance. Andy [cid:image001.png@01D33DE6.714695A0] From: Acker Dawn Apple [mailto:notifications@github.com] Sent: 05 October 2017 14:20 To: valor-software/ng2-file-upload <ng2-file-upload@noreply.github.com> Cc: Andrew Stephen <andrew.stephen@mtg.im>; Author <author@noreply.github.com> Subject: Re: [valor-software/ng2-file-upload] Adding additional parameters to queue (#900) I assume you can't add parameters because of type checking, correct? Because in JavaScript you can add any property to just about any variable. If type checking be yo enemy, I always use bracketed variables to scoot around the type checking. Example object['myUntypedVarName'] = 33 More info if I am wrong. How can you not add a property to a variable? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub<https://github.com/valor-software/ng2-file-upload/issues/900#issuecomment-334462465>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AdRpzuGcYTbOg9y5ZfTzqa9oK500JuIoks5spNebgaJpZM4Pt3j1>.
AckerApple commented 2017-10-05 14:36:58 +00:00 (Migrated from github.com)

Hey SO I think I understand you. I forked this code into angular-file because I needed more control. However, if you are new to Angular I also assume you maybe new to HTML5 FormData class, yes?

In my fork, I am pushing adoptees, to use the [(file)] and [(files)] model to allow for control and separation from the file http transmitter (FileUploader if not using Angular Http class).

Um, I'm not much of a free knowledge guy and also I don't know how far back into Angular2 from Angular4, will my angular-file fork actually even work. I have unit tests but you'd have to replace the Angular4 dependencies for 2 (dont do that)

To go with my fork, it sounds like you would need to bridge a knowledge gap (assume).

I have different examples at my fork: https://www.npmjs.com/package/angular-file#quick-start

Good luck

Hey SO I think I understand you. I forked this code into angular-file because I needed more control. However, if you are new to Angular I also assume you maybe new to HTML5 FormData class, yes? In my fork, I am pushing adoptees, to use the [(file)] and [(files)] model to allow for control and separation from the file http transmitter (FileUploader if not using Angular Http class). Um, I'm not much of a free knowledge guy and also I don't know how far back into Angular2 from Angular4, will my angular-file fork actually even work. I have unit tests but you'd have to replace the Angular4 dependencies for 2 (dont do that) To go with my fork, it sounds like you would need to bridge a knowledge gap (assume). I have different examples at my fork: https://www.npmjs.com/package/angular-file#quick-start Good luck
stephenad commented 2017-10-05 14:38:56 +00:00 (Migrated from github.com)

Hi Acker,

Thank you for your replies and help I will proceed from here and see how I go.

Thanks
Andy

From: Acker Dawn Apple [mailto:notifications@github.com]
Sent: 05 October 2017 15:37
To: valor-software/ng2-file-upload ng2-file-upload@noreply.github.com
Cc: Andrew Stephen andrew.stephen@mtg.im; Author author@noreply.github.com
Subject: Re: [valor-software/ng2-file-upload] Adding additional parameters to queue (#900)

Hey SO I think I understand you. I forked this code into angular-file because I needed more control. However, if you are new to Angular I also assume you maybe new to HTML5 FormData class, yes?

In my fork, I am pushing adoptees, to use the [(file)] and [(files)] model to allow for control and separation from the file http transmitter (FileUploader if not using Angular Http class).

Um, I'm not much of a free knowledge guy and also I don't know how far back into Angular2 from Angular4, will my angular-file fork actually even work. I have unit tests but you'd have to replace the Angular4 dependencies for 2 (dont do that)

To go with my fork, it sounds like you would need to bridge a knowledge gap (assume).

I have different examples at my fork: https://www.npmjs.com/package/angular-file#quick-start

Good luck


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/valor-software/ng2-file-upload/issues/900#issuecomment-334484819, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AdRpzvku6Ky9oLHEdQsRmeBmaCcOhNn6ks5spOmOgaJpZM4Pt3j1.

Hi Acker, Thank you for your replies and help I will proceed from here and see how I go. Thanks Andy From: Acker Dawn Apple [mailto:notifications@github.com] Sent: 05 October 2017 15:37 To: valor-software/ng2-file-upload <ng2-file-upload@noreply.github.com> Cc: Andrew Stephen <andrew.stephen@mtg.im>; Author <author@noreply.github.com> Subject: Re: [valor-software/ng2-file-upload] Adding additional parameters to queue (#900) Hey SO I think I understand you. I forked this code into angular-file because I needed more control. However, if you are new to Angular I also assume you maybe new to HTML5 FormData class, yes? In my fork, I am pushing adoptees, to use the [(file)] and [(files)] model to allow for control and separation from the file http transmitter (FileUploader if not using Angular Http class). Um, I'm not much of a free knowledge guy and also I don't know how far back into Angular2 from Angular4, will my angular-file fork actually even work. I have unit tests but you'd have to replace the Angular4 dependencies for 2 (dont do that) To go with my fork, it sounds like you would need to bridge a knowledge gap (assume). I have different examples at my fork: https://www.npmjs.com/package/angular-file#quick-start Good luck — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub<https://github.com/valor-software/ng2-file-upload/issues/900#issuecomment-334484819>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AdRpzvku6Ky9oLHEdQsRmeBmaCcOhNn6ks5spOmOgaJpZM4Pt3j1>.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dc/ng2-file-upload#900