upload binary file
"Tom Lesters" <[email protected]>
| Newsgroups | gmane.comp.web.quixote.user |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> def count (request): upload = request.get_field('file') lines = 0 for line in open(upload.tmp_filename, 'r'): lines += 1 return "<p>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 _______________________________________________ Quixote-users mailing list [email protected] http://mail.mems-exchange.org/mailman/listinfo/quixote-users