17 Sep
2004
17 Sep
'04
7:43 a.m.
Hi, I want to allow uploading files from my website and put it in a database. My short script works: if myfile and myfile.filename != '': container.dbUpdateFile (id=str (id_ds), myfile=myfile.read ()) Now I want to put the mimetype in the database put how can I get the mimetype? I try: import mimetypes guess_type(myfile.filename) but I got an the error "*You are not authorized to access this resource".* What's wrong? I also want to put the filename in my database, but the Internet Explorer gives me the filename with path. Is there a funtionc to get the filename without path? Thanks, Patrick