@staticmethod
    def __copy_uploaded_file(upfile):
        # read data
        all_data = ''
        while True:
            data = upfile.file.read(8192)
            if not data:
                break
            all_data += data
        # copy uploaded file on the server
        filename = ntpath.basename(upfile.filename)
        backup_filename = "{0}/uploads/{1}".format(CURRENT_DIR, filename)
        saved_file = open(backup_filename, 'wb')
        saved_file.write(all_data)
        saved_file.close()
        return backup_filename

# Application root
Copy uploaded file on the server and return its path
dataset/ETHPy150Open mikrosimage/ColorPipe-tools/web_app/app.py/Application.__copy_uploaded_file