[Zope] Uploading Images from a web from

Steve Spicklemire steve@spvi.com
Sun, 16 Sep 2001 10:16:09 -0500


Ahh.. I didn't know you were calling manage_addImage! Just pass '' for 
the id, and manage_addImage will do the rest (I swiped the code I sent 
from the implementation of manage_addImage, so it already does this for 
you.)

so:

<dtml-call "_[gallerypath].manage_addImage('',image)">
<dtml-call "RESPONSE.redirect ('../managegalleries.htm')">

should just work.

-steve


On Sunday, September 16, 2001, at 10:13 AM, Jan Lentfer wrote:

> Steve Spicklemire wrote:
>
>> 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
>>
>
> That's python, right?
>
> Could you tell me how I can integrate this into my DTML-method?
>
> At the moment my DTML-Method looks like this:
>
> ---------------------
>
> <dtml-call "_[gallerypath].manage_addImage(image.filename,image)">
> <dtml-call "RESPONSE.redirect ('../managegalleries.htm')">
>
> ----------------------
>
> This works if I use Netscape on Linux, but doesn't with MSIE on Win2K, 
> I guess because of the \-Syntax.
>
> I am not very familar with Python, but I finally bought a book 
> (Addison-Weseley: Python 2). If I just had the time to read it ;-)
>
> Thanks a lot in advance,
>
> Jan
>
> --
> Jan@MountainbikeHQ.de
> http://www.MountainbikeHQ.de - Your home for DH, DS and CC 
> Mountainbiking
>
>