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);

but I still get "application/octet-stream" in my php check.

When I do a trace before and after the assignment I get contentType =
null then contentType = "image/jpeg", but it seems to get reset during
the upload, as if contentType is hardwired in no matter what you do
with the URLRequest (otherwise wouldn't contentType be the default
"application/octet-stream" rather than null before the assignment?)

Any Adobe guys got any comments on this?

:-(


--- In flexcoders@yahoogroups.com, Jeff Tapper <[EMAIL PROTECTED]> wrote:
>
> Its not that it isnt working, its just that I am unable to have my php 
> script detect the proper mimetype, which I'd like to use to prevent 
> malicious uploads.  Ideally, I'm looking to use the same server side
code 
> for uploads from both php and from flex.  with the current situation, i 
> need to disable my mimetype checks in php to allow the flex  uploads.
> 
> At 08:57 AM 7/10/2006, Clint Tredway wrote:
> 
> >I am using PHP to upload images to the server and it works just fine :)
> >
> >On 7/10/06, Jeff Tapper <<mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED] > wrote:
> >
> >I'm finding that when i use file reference to upload a gif to the
server,
> >the php script which receives it thinks its an
Application/Octet-Stream,
> >rather than image/gif. However, if i upload the same gif through an
html
> >interface, the php script properly interprets it as an image/gif.
Is this
> >a bug or a feature, or something im doing wrong?
> >
> >--
> >No virus found in this outgoing message.
> >Checked by AVG Anti-Virus.
> >Version: 7.1.394 / Virus Database: 268.9.10/383 - Release Date:
7/7/2006
> >
> >
> >
> >
> >--
> >diabetic? <http://www.diabetesforums.com>http://www.diabetesforums.com
> >Bill Cosby - A word to the wise ain't necessary - it's the stupid ones 
> >that need the advice.
> >
> >
> >No virus found in this incoming message.
> >Checked by AVG Anti-Virus.
> >Version: 7.1.394 / Virus Database: 268.9.10/383 - Release Date:
7/7/2006
> 
> 
> 
> 
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.1.394 / Virus Database: 268.9.10/383 - Release Date: 7/7/2006
>






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Great things are happening at Yahoo! Groups.  See the new email design.
http://us.click.yahoo.com/TISQkA/hOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to