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!

File Upload

Status
Not open for further replies.

1DMF

Programmer
Joined
Jan 18, 2005
Messages
8,795
Location
GB
Hi,

I have a file upoad program that works fine, however, larger files are now starting to fail with
Bad Gateway. Web server received an invalid response while acting as a gateway or proxy.
I know this is probably my web hosts causing the problem, i've complained till i'm blue in the face, and changing host at present really is not the option i want to take, got to much in devel to start messing about with switching hosts.

So how do i resolve this, if enctype="multipart/form-data" is no longer an option to facilitate upload , what else can i use that is web based?

I can configure an anonymous FTP area no problem, and have an iframe for them to drag and drop the file, but how do I get the file name.

would i simply have a form field they type the filename into and then when they submit the form i do a name check and if exists move from FTP area to where I need the file?

would that be a best solution? I need to only allow MP3's how do I do that?

FTP via HTTP for large files i feel is the only option to get round my useless web host, but want the form to feel like the old method so my members area works roughly the same as before.

any ideas?

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
>> but how do I get the file name.

How are you getting it now?
 
i'm getting it now by an input field of type 'file' , the user clicking the browse button and selecting the file, this also attaches it to the form as enctype = "multipart/form-data"

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
that should work for Net::FTP too
 
I'm a bit lost Kevin, If I put an input type of 'file' on a form and enctype = "multipart/form-data" , it will send the file attached to the header when the form is submitted.

This is no good as the server bombs, I don't understand how I use a standard web form to facilitate FTP, without the form attaching the file to the header.

How would I write a form that works like the old way but uses FTP to send the file, for the time being i've re-written it to use an IFRAME with FTP so the user can drag 'n' drop the required file and everything is working fine, well when I got the web host to change the permissions so PERL could manage the FTP area.

But it would be nice to know how I can offr a 'browse' to select file and upload with a standard form but via FTP not HTTP.

1DMF

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top