[Zope] Uploading Images from a web from

Steve Spicklemire steve@spvi.com
Sun, 16 Sep 2001 06:02:14 -0500


Hi Jan,

You can do (essentially) what the Zope File object does:

         filename=file.filename
         filename=filename[max(string.rfind(filename, '/'),
                         string.rfind(filename, '\\'),
                         string.rfind(filename, ':'),
                         )+1:]

-steve

On Sunday, September 16, 2001, at 12:50 AM, Jan Lentfer wrote:

> At 19:56 15.09.2001 -0500, Steve Spicklemire wrote:
>
>> Don't forget method="post"
>>
>> <form name="" action="galleries/uploadImage.dtml"
>> method="post" enctype="multipart/form-data">
>>
>> ;-)
>>
>> -steve
>
>
> Ooops, I must have lost that tag when I was playing around with the 
> code. Anyway, it works now, thanks a lot. Which brings up a new 
> question.
> Can I somehow determine the filename of the choosen file?
>
> When I use the tag <input type="file" name="image">
> "image" will return the path and filename on the local FS. Is it 
> possible to read out just the filename without the path. Is that 
> transmitted?
>

> Many thanks in advance,
>