Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
Think about Loose Coupling
 
PerlMonks  

Re: Re: Re: Upload a file from a web form

by dws (Chancellor)
on Jul 22, 2003 at 14:22 UTC ( [id://276860]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re: Re: Upload a file from a web form
in thread Upload a file from a web form

Well, managed to get CGI.pm updated, however I still generate files with zero size! If I have permission to create a file does it mean that I also have permission to write to that particular file?

If you can create it, you can write to it (at least on Win32 and Unix (or Unix-like) platforms).

I'm puzzled on this one. I switch my upload script from using the

while ( <$filename> ) { ...
approach, and tried the
while ( read($filename, $_, 1024) ) { ...
form, and both worked (as I expected they would).

Having the read() return 0 is the only thing I could see (based on what you posted) that would cause an empty file. Since CGI.pm reads and caches the incoming file first, there might be an issue with something like the filename. Can you post the HTML form that you're using to trigger the upload, and show us the filename that you're trying to upload? There might be a clue thereabouts.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://276860]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.