Hi,

I experienced the following problem with TG 08a5 and CherryPy 2.1.0 on
Linux:
while one client uploads a file, all other requests are blocked until
the the upload is finished.

Is there a way to make fileuploading multiuser capable?

my controller looks like this:

    @turbogears.expose()
    def upload(self, myFile, folderName):
        folderPath = util.getUploadFolderPath(folder=folderName)

        filePath = os.path.join(folderPath,  myFile.filename)
        fileHandle = open(filePath, 'a')
        while True:
            data = myFile.file.read(8192)
            if not data:
                break
            fileHandle.write(data)
        fileHandle.close()
        return self.uploadForm(folderName=folderName)

cheers,
Alex.

Reply via email to