I want to upload a file in Swift. I executed this code in python :
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')
The code is running, but, how can I check if the file is stored in swift ? The file does not exist in the folder Swift.
Thank you.