Skip to content

blindspoter/qiniufs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QINIUFS

Version GitHub license

Qiniu file uploader for Flask

Install

$ pip install qiniufs

Usage

bucket_name = "your-qiniu-bucket-name"
prefix_url = "your-qiniu-domain"
fs = QiniuFS(bucket_name, access_key, secret_key, prefix_url)

# upload
mime = data.mimetype
r, d = fs.upload_data(data, mime=mime)
if r and d:
    key = d.get('key')
    url = fs.get_url(d.get('key'))

# delete
r = fs.delete_file(key)
if r:
    print "success"

About

Qiniu file uploader for Flask

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages