You gotta be creative.  =)

You get the http Status code back from fileReference.  Use that to communicate what you want back to the client.

We have 4 messages in my flex code that we show depending on what http status code the servlet sends back.

You could do something similar:
status code 200 - all is well
status code 2500 - invalid format
status code 3500 - duplicate file exists

Yes, the limitation of fileReference sucks, but if you need to use it, this is a nice hack to get what you want.

On 9/26/06, ben.clinkinbeard <[EMAIL PROTECTED]> wrote:

We are just trying to upload a file and then return some data back to
Flash, but apparently that is not possible. Number 2 at
http://www.mehtanirav.com/2006/04/29/filereference-on-mac-type-is-not-available/
seems to confirm what I feared about FileReference.

Can someone please explain to me how/when its useful to upload a file
and get nothing back besides a confirmation? How would you communicate
that there is already a file uploaded with that name? How would you
communicate that the file's data is not correctly formatted?

I cannot believe there is no way to get any returned data from the url
that you upload your file to. Seriously- what is the point of using
FileReference with such an immense limitation?

Disappointed,
Ben

--- In flexcoders@yahoogroups.com, "Tom Ortega" <[EMAIL PROTECTED]> wrote:
>
> We ended up having to use a servlet in which we upload the file too
and pass
> any non-file data as url vars.
>
> Are you changing the file within the same call?
>
> -Tom2
>
> On 9/26/06, ben.clinkinbeard <[EMAIL PROTECTED]> wrote:
> >
> > Should I take this as a yes? Simply not possible?
> >
> > --- In flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>, "
> > ben.clinkinbeard"
> > <ben.clinkinbeard@> wrote:
> > >
> > > Hello, I came across some info (after unsuccessfully trying myself)
> > > stating that it is not possible to make SOAP calls with
attachments in
> > > Flex because:
> > >
> > > The problem with the Flex file upload using FileReference is that it
> > > does not provide support for sending SOAP attachments.
> > >
> > > 1. Headers cannot be added (therefore we cannot specify SOAPAction)
> > > 2. Content-Type is fixed as multipart/Form-Data which may not work
> > > with our webservice
> > > 3. It doesn't allow you to arrange/ specify in what order the
> > > multiparts appear in, or if you want the generated blocks to appear
> > at all
> > > 4. Doesn't seem to pick up the entire file as binary output when
> > > monitoring the outgoing request using TCP/IP monitor.
> > >
> > >
> > > Is this true? What is the best solution for an app that requires a
> > > file be uploaded and its contents returned to the Flash player?
> > >
> > > Thanks,
> > > Ben
> > >
> >
> >
> >
>


__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to