views:

286

answers:

2

I have a real problem with a classic ASP page. The page allows the user to upload a document and save it to the database. The intial page posts to another asp page which saves down to the db. This works on IE and Firefox. However on Safari it fails. I've debugged the problem and it boils down to the fact that of all the controls that the server page has access to, only 1 control is missing. This happens to be this:

<input type="file" size="40" id="myfile" name="myfile" />

So I'm wondering why safari would decide to not give me access to this control (using asp's Request("") ) and why it works in FF and IE. I have some debug code which writes out all controls and it doesn't see this control.

p.s. I hate Web development

A: 

Im getting the same thing on Safari 4.0.5. I develop in coldfusion and a simple form posting to a processing page is working on all the major browser except Safari. My processing page fails as the form field "file" is empty so there is nothing for the server to upload :O(

Simon
This is a good indicator that you're missing the enctype as shown above.
thomask
+1  A: 

Are you setting the ENCTYPE attribute correctly in your form? If you have file uploads I think it should be something like

<form action="/my/form/processor.asp" enctype="multipart/form-data" method="post">

I think the default enctype is application/x-www-form-urlencoded, which apparently works for most other browsers but apparently Safari actually requires this be set correctly.

NobodyMan