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.



Maybe this example [3] helps.



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&param2=2)



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.



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 <[email protected]>
Sent: Friday, July 12, 2019 8:50:53 PM
To: [email protected]
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 <[email protected]> wrote:

> Can you show a flash snippet of what you’re trying to achieve? Would you
> be using FileReference in flash?
>
>
>
> ________________________________
> From: Piotr Zarzycki <[email protected]>
> Sent: Friday, July 12, 2019 4:02:13 PM
> To: [email protected]
> 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 <[email protected]> napisał(a):
>
> > Do you mean multipart or something else?
> >
> > > On Jul 12, 2019, at 3:44 PM, Piotr Zarzycki <[email protected]
> >
> > 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>*
>

Reply via email to