durusmail: quixote-users: upload binary file
upload binary file
2006-03-07
Tom Lesters
2006-03-08
Mike Orr
upload binary file/current state of quixote
2006-03-08
Bo Yang
Re: upload binary file/current state of quixote
2006-03-08
mario ruggier
2006-03-08
David Binger
2006-03-09
Bo Yang
2006-03-08
Mike Orr
Quixote, QP, the future...?
2006-03-08
Titus Brown
2006-03-09
David Binger
2006-03-09
Graham Fawcett
2006-03-09
Graham Fawcett
2006-03-09
David Binger
2006-03-09
Mike Orr
2006-03-09
David Binger
2006-03-09
Bo Yang
2006-03-09
Bo Yang
upload binary file
Tom Lesters
Hi All,

Seems upload binary files should be really easy in Quixote,
There are Upload class,
But I could not find how to receive, save file in the demo
Look at the source code, seem it's more about txt file.
the example on quixote cookbook is out dated: there is no tmp_filename
anymore:

http://www.quixote.ca/qx/UploadingFiles 
def count (request):
  upload = request.get_field('file')
    lines = 0
    for line in open(upload.tmp_filename, 'r'):
        lines += 1
    return "

The file is %i lines long." % lines Anybody can point to me 3-5 line code of checking the binary file size then save it ? Thanks a bunch, Tom

reply