[Zope] Still having problems with Photo

Dennis Allison allison@sumeru.stanford.EDU
Mon, 15 Jul 2002 21:20:24 -0700


>
>I *think* photos selection of engines is hardwired to be pil or imagemagick.
>
>Robert

Correct, but correcting the typo does not resolve the problem.  Thanks for the 
pointer.   I have corrected the engine to be PIL

I still get a key error on the uploaded file variable from the corrected program:

>>
>> The form, a DTML-Method:
>> ------------------------------------------------------------------------
>>
>> <dtml-var standard_html_header>
>> <p>
>> <form action="photo_upload" method="POST" enctype="multipart/form-data">
>>    <input type="file"  name="the_file" size="30">
>>    <br>
>>    <input type=submit name=submit value="Upload Photo">
>> </form>
>> <p>
>> <dtml-var standard_html_footer>
>> ------------------------------------------------------------------------
>>
>>
>> The handler, a Python Script:
>> ------------------------------------------------------------------------
>>
>> request = container.REQUEST
>> RESPONSE =  request.RESPONSE
>> # move to photofolder
>> p = container.restrictedTraverse('Photos')
>> if( not p ): raise AssertionError, 'No Place to store Photos'
>> the_id = container.genUID()
>> the_title = 'My Photo'
>> the_file = request['the_file']
>> p.manage_addProduct['Photo'].manage_addPhoto( the_id, the_title, the_file,
>engine='PIL')
>> request['RESPONSE'].redirect( request['URL'] )
>>
>> ------------------------------------------------------------------------
>>
>> Photos is a PhotoFolder instance, essentially a vanilla instance out
>> of the box without much of anything set.  genUID is a Python external
>> method that produces a unique identifier.  PNG is installed and functions
>> appears to function properly.
>>
>> Any suggestions/pointer appreciate.  This one's got me stumpped.
>>
>> -dra
>>
>>
>>
>> _______________________________________________
>> Zope maillist  -  Zope@zope.org
>> http://lists.zope.org/mailman/listinfo/zope
>> **   No cross posts or HTML encoding!  **
>> (Related lists -
>>  http://lists.zope.org/mailman/listinfo/zope-announce
>>  http://lists.zope.org/mailman/listinfo/zope-dev )
>>
>

--VAA02029.1026793056/sumeru.stanford.EDU--