Ich möchte eine Datei in Swift hochladen. Ich ausgeführt, um diesen Code in Python:Wie lade ich eine Datei im Swift Storage-System mit Python hoch?
import swiftclient
swift = swiftclient.client.Connection(auth_version='1',user='test:tester',key='testing',authurl='http://localhost:8080/auth/v1.0')
# Create the swift container
swift.put_container('cute-cats')
# Upload the object
with open('cat.jpg', 'rb') as f:
file_data = f.read()
swift.put_object('cute-cats', 'cat.jpg', file_data)
# List the containers
print swift.head_account()
# List the objects in the cute cats containers
print swift.head_container('cute-cats')
Der Code ausgeführt wird, aber, wie kann ich überprüfen, ob die Datei in swift gespeichert? Die Datei existiert nicht im Ordner Swift.
Vielen Dank.