现在我正在使用这样的线程,但它很慢。我正在寻找上传文件夹 api 的内容。
def run(self):
"""Starts the uploading thread."""
try:
for file_name in self.files["thumbs"]:
self.transfer_rackspace(file_name, self.container_thumbs)
except Exception:
pass
try:
for file_name in self.files["tiles"]:
self.transfer_rackspace(file_name, self.container_tiles)
except Exception:
pass
try:
for file_name in self.files["cube"]:
self.transfer_rackspace(file_name, self.container_photo)
except Exception:
pass
try:
for file_name in self.files["image"]:
self.transfer_rackspace(file_name, self.container_photo)
except Exception:
pass