On 22/03/06, AB <[EMAIL PROTECTED]> wrote:
In Karrigell, this upload script works in IE and firefox, and the basics are similar to yours.
import os
f = _myfile.file # file-like object
dest_name = os.path.basename(_myfile.filename)
out = open('c:/WINNT/Profiles/tw/Desktop/webupload/'+dest_name,'wb')
# copy file
import shutil
shutil.copyfileobj(f,out)
out.close()
print "File Uploaded Succesfully" #print to browser
Maybe your cgi is returning something strange, have you tried some print statements to see what's going on at various parts of the script ?
>
> try something like this:
> filename = os.path.basename(fullpathname)
I tried the following with the same result:
myName = ulImage.filename
newFile = file (os.path.join(upload_dir, os.path.basename(myName)), 'wb')
Any other ideas? Seems like it shouldn't be a browser issue though...
In Karrigell, this upload script works in IE and firefox, and the basics are similar to yours.
import os
f = _myfile.file # file-like object
dest_name = os.path.basename(_myfile.filename)
out = open('c:/WINNT/Profiles/tw/Desktop/webupload/'+dest_name,'wb')
# copy file
import shutil
shutil.copyfileobj(f,out)
out.close()
print "File Uploaded Succesfully" #print to browser
Maybe your cgi is returning something strange, have you tried some print statements to see what's going on at various parts of the script ?
-- http://mail.python.org/mailman/listinfo/python-list