Adding additional parameters to queue #900
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
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'] = 33More info if I am wrong. How can you not add a property to a variable?
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.
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
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.