Thanks Derek,

That's the conclusion I was arriving at too.

I hate having work around something that should be there, it's like working with MS's non-standards compliance :-(

Derek Adams wrote:

I had the same problem with mime types.  My solution was to use the file suffix to figure out the content type.  I was using a servlet on the backend, so I just called getServletContext().getMimeType(filename). In your case, you may want to pass the mime type in a separate variable on the URL  and use that to override the content type in the backend processing logic. Something like this:

    var vars:URLVariables = new URLVariables();
    vars.sessionId = manager.getSessionId();
    vars.contentType = overridingContentType;
    uploadRequest = new URLRequest();
    uploadRequest.url = ""http://my-upload-processor/upload">http://my-upload-processor/upload";
    uploadRequest.data = "">     file.upload(uploadRequest);

Hope that helps,

Derek


--- In [email protected], "Geoffrey Williams" <[EMAIL PROTECTED]> wrote:
>
> Changing the content type is not supported in uploads. This is
> documented in the URLRequest class.
>
> --- In [email protected], "pmarstonuoa" p.marston@
> wrote:
> >
> > Hi Jeff,
> >
> > I'm having the same problem. According to the Flex2 documentation
> the
> > content type defaults to "application/octet-stream", but you can
> set
> > the contentType of the request:
> >
> > var request:URLRequest = new URLRequest("myURL");
> > request.contentType = "image/jpeg";
> > myFileReference.upload(request);
>


-- 
______________________________________________________________ 
Phil Marston 
Learning Technologist
Learning Technology Unit 
Edward Wright G33, University of Aberdeen, Aberdeen, AB24 3QY, UK
[EMAIL PROTECTED] Tel: +44(0)1224 273329 / +44(0)7798 723660 
http://www.abdn.ac.uk/diss/ltu/pmarston/
http://www.abdn.ac.uk/diss/ltu/
______________________________________________________________

The University of Aberdeen Open Day 29th August 2006
Booking is essential
www.abdn.ac.uk/openday
email [EMAIL PROTECTED]
or call 0800 027 1495
__._,_.___

--
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
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to