Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trouble with upload

Status
Not open for further replies.

kristof

Programmer
Jun 2, 2000
234
BE
Hi all,

On one of our sites I have a problem with file uploads.
To be exact, uploading images. (Don't think it matters in this case).

When you select a file in a filebox and submit it, the CF page behind it doesn't recognize any of the variables it should have received.

So, when i use a filebox like this one:

<form name=&quot;somename&quot; method=&quot;post&quot; action=&quot;uploads.cfm&quot; ENCTYPE=&quot;multipart/form-data&quot;>
<input type=&quot;file&quot; name=&quot;visual&quot;>
</form>

and submit it, I get the following error:

Error resolving parameter FORM.VISUAL

(even when I just display the variable, without actually uploading anything)

Apparently, all the variables and thus all their values aren't posted to the next page. But if I remove the ENCTYPE, meaning that I send content as plain ASCII, all values arive, but ofcourse, I can't upload anymore.

But the strange thing is, this problem definitely isn't there because of the code, because it's a site that has been running just fine for over a year now.

When I call our Hosting partner, they tell me its likely that the fault lies with the client software (browser) sending bad binary data, because occasionally it seems to work anyhow.

Has anyone had any experience with this? Could it be that it's a firewall setting denying access to binary data?
Or maybe it only allows it from trusted sources?

Thanx in advance for any input!

Kristof
 
Hey Kristof,

My first suspicion would be in line with what your hosting partner said. Can you provide more details on when the problem occurs? What I would be interested to see are who it fails for, can you duplicate it, does it occur in NS,IE and on which platforms. If it's a sporadic problem that sometimes works and then sometimes doesn't for the same browser, then I would suspect something wrong with the server.

There shouldn't be anything like a firewall causing this problem since at the network layer, all data is seen as binary.

GJ
 
Hey Gunjack,

I've tested it multiple times on our local network on
IE4, IE5, NS4.7 and mac IE4.5, IE5, NS4.7

I asked our client to confirm if they still had it, and they did.

Our hosting partner told us they tested it locally and usually it worked, except a few occasions. They have also contacted some other people who reported it functioned.

So, in short, at my company and at our client's, it never worked. At our Hoster it did.

But, while thinking about this response, i've been testing a bit more.

The pages I used to test this, are located in a UID and PWD protected map. I've put these at the root of the website. Which isn't protected and thus available to the IUSR.
(Alas, i'm not allowed to post an URL :-I, don't think it matters much)
In this case, every attempt I made succeeded.

Anyhow, this looks like a permission difference between the IUSR and the one on the map.(?)

Hope you can confirm this?

PS: if it IS a problem with bad content. Does the problem lie with the files one tries to upload, or with the software?
 
Hey Kristof,

If it were a problem with bad content, it would be the fault of the browser as files are nothing but a string of bytes and whether the file is corrupt shouldn't make a difference in transferring it.

As far as the other goes, I'll have to do some experimenting. The fact that it works for them throws another layer of confusion in this as they could be &quot;less than honest&quot; or it could be something to do with how they access it locally or possibly because they have super-user permissions on the server, etc... I would guess that it has to do with either their config or their webserver software as I can't imagine this being something that the http spec doesn't allow (enctype on protected resources) and I'm sure all those browsers don't have the same bug.

Can you post the code for your receiving script? If so, I'll setup a test here and see if I get the same results.

Good luck,
GJ
 
Hey GunJack,

Here goes, it's as clean as it could be i guess:

<cfoutput>
ID: #FORM.VISUAL#<br>
<br>
If this is showing the form submit works!
</cfoutput>

Tnx in advance! :-9

Kristof
 
Hey GunJack,

Here goes, it's as clean as it could be i guess:

<cfoutput>
VISUAL TEMP FILE: #FORM.VISUAL#<br>
<br>
If this is showing the form submit works!
</cfoutput>

Tnx in advance! :-9

Kristof
 
hey you two

we have got the same problem.

because we are isp, i can tell you the following:

if we connect the site locally (over the internet by our router) everything works perfect.

if we try it from remote (over another isp). no parameter is submitted.

the site is password protected via ntfs. i think, that this is the problem.

e.zbinden
 
we've checked it out

it is definitively the ntfs secure section and the multipart-form which doesn't fit.

maybe you let your user identify himself via form and set a cookie on his browser if he is identified. then you only let him access your uploadsite when he has got the cookie (this is the workaround we use now).

ezbinden
 
Hiya guys,

I've found (some kind of ) a sollution. I was using IE5.0 and have installed 5.5 . Don't know why, but this seems to do the trick.

Question remains, why did it go wrong in the first place?

Tnx for the responses,
I'll keep you posted if I learn more. :-V

Gtz,

Kristof
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top