Hi Yishay, Some comments inline.
[1] https://paste.apache.org/rk1ro sob., 13 lip 2019 o 14:06 Yishay Weiss <yishayj...@hotmail.com> napisał(a): > Hi Piotr, > > > > The beads [1] you mentioned are supposed to implement FileReference > methods, that’s why I was asking about the flash way of doing it. > > > *We are doing it in following way [1].* > > Maybe this example [3] helps. > > > *Yes this example was very helpful and we are doing upload in exactly the same way. * > > As I understand the SO answers [2], they’re suggesting to either send the > params on the url or in a FormData. > > > > For the former solution you can add <FileUploader id=”myUploader/> bead to > the file proxy and then on blobChangedHandler() you can make a call like: > > > > myUploader.upload(url?param1=1¶m2=2) > > > *As you can see in my link [1] we are doing that in a way as you are suggesting in Flex. In Royale I would like to avoid completely such things like concatenating string in order to build url. That's way I have started this thread to make sure that I'm not missing some better way than this. It looks like I need to implement it. Thanks for confirmation actually.* > > If you want the latter solution you can create a new IFileModel bead with > params that would implement FormData on the JS side. > > > > It could be that FileUploader needs to be refacotred to read and > IFileModel instead of an IModel, and that blob() should be part of the > interface and return an Object. > > > *Once I jump into implementation I will take into account your suggestions.* > > Hope you understand when you look at the code, otherwise ask. > > > > Thanks. > > > > [1] > https://github.com/apache/royale-asjs/tree/develop/frameworks/projects/Network/src/main/royale/org/apache/royale/file/beads > > [2] https://stackoverflow.com/questions/15218292/xhr-sendfile-params > > [3] https://github.com/yishayw/Examples/blob/FileProxy/Examples.mxml > > > > ________________________________ > From: Piotr Zarzycki <piotrzarzyck...@gmail.com> > Sent: Friday, July 12, 2019 8:50:53 PM > To: dev@royale.apache.org > Subject: Re: Uploading files with parameters > > Hi Yishay, > > I'm trying to achieve exactly what is in the link from SOF. > > Thanks, > Piotr > > On Fri, Jul 12, 2019, 7:35 PM Yishay Weiss <yishayj...@hotmail.com> wrote: > > > Can you show a flash snippet of what you’re trying to achieve? Would you > > be using FileReference in flash? > > > > > > > > ________________________________ > > From: Piotr Zarzycki <piotrzarzyck...@gmail.com> > > Sent: Friday, July 12, 2019 4:02:13 PM > > To: dev@royale.apache.org > > Subject: Re: Uploading files with parameters > > > > Hi Harbs, > > > > I mean something like here [1] - I'm not sure if it answers to your > > question. > > > > [1] https://stackoverflow.com/questions/15218292/xhr-sendfile-params > > > > Thanks, > > Piotr > > > > pt., 12 lip 2019 o 14:58 Harbs <harbs.li...@gmail.com> napisał(a): > > > > > Do you mean multipart or something else? > > > > > > > On Jul 12, 2019, at 3:44 PM, Piotr Zarzycki < > piotrzarzyck...@gmail.com > > > > > > wrote: > > > > > > > > Hey Guys, > > > > > > > > We are progressing with port Flex app to Royale. One of the feature > in > > > that > > > > app is uploading File to server sigh along with couple of additional > > > > parameters. I see that uploading is possible trough several beads > > > available > > > > here [1]. > > > > > > > > Unfortunately non of them provides nice options to add as part of the > > > > upload additional parameters. > > > > > > > > I'm going to implement FileUploaderWithParams bead where ability of > > > adding > > > > additional params as object will be handled. > > > > > > > > Is there anything that I'm missing here ? > > > > > > > > [1] > > > > > > > > > > https://github.com/apache/royale-asjs/tree/develop/frameworks/projects/Network/src/main/royale/org/apache/royale/file/beads > > > > > > > > > > > > Thanks, > > > > -- > > > > > > > > Piotr Zarzycki > > > > > > > > Patreon: *https://www.patreon.com/piotrzarzycki > > > > <https://www.patreon.com/piotrzarzycki>* > > > > > > > > > > -- > > > > Piotr Zarzycki > > > > Patreon: *https://www.patreon.com/piotrzarzycki > > <https://www.patreon.com/piotrzarzycki>* > > > -- Piotr Zarzycki Patreon: *https://www.patreon.com/piotrzarzycki <https://www.patreon.com/piotrzarzycki>*