Many thanks, it works.

----- Puvodní zpráva ----- 
Od: "Peter Bengtsson" <m...@peterbe.com>


How about something like:
<dtml-in "PyS_csvimport(fcsv.read())" prefix="pys">


On 14 October 2011 10:29, Jaroslav Lukesh <luk...@seznam.cz> wrote:
> Hi all,
>
> I want upload csv file for direct processing into SQL only, not for save 
> to
> ZODB nor LocalFS. Upload for LocalFS already worked for me.
>
> So I have form:
>
> <form method="POST" enctype="multipart/form-data">
> <input type="file" name="fcsv" value="" size="50"><br>
> <input type="file" name="fcsv2" value="" size="50"><br>
> <input type="submit" name="fileupload" value="Upload">
> </form>
>
> Diagnostic processing:
> <dtml-var "fcsv.filename">::<dtml-var "fcsv.headers['Content-Type']
> ">::<dtml-var fcsv>
> And what it get:
> data_2011.CSV::application/vnd.ms-excel::
>
> Su upload worked, but what I can access to data of the uploaded file?
>
> the dtml-in does not process anything, only displays NO DATA.
>
> <dtml-in "PyS_csvimport(fcsv)" prefix="pys">
> <dtml-var pys_item><br>
> <dtml-else>
> NO DATA
> </dtml-in>
>
> PyS_csvimport parse CSV file by line and return array structure like this
> [['',''],['','']].
>

_______________________________________________
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to