uploading files to file system/zipping/downloading problems

OriginalBrownster originalbrownster at gmail.com
Sun Aug 20 16:49:22 EDT 2006


I am currently uploading a file from a users computer to the file
system on my server using python, just reading the file and writing the
binaries.

        total_data=' '
        while True:
            data = upload_file.file.read(8192)
            if not data:
                break
            total_data += data
            f = open(target_file_name, 'wb')
            f.write(total_data)
            f.close

However when i download the file from the server it is not intact and
it cannot be opened. It is happening with every type of file.

It seemed to be working before and now it is..maybe I goofed up and
deleted something.
However I can't seem to find it.

any ideas??




More information about the Python-list mailing list