84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
是前端用户type=file那样上传图片文件。我执行ret, info = put_file(token, key, localfile)老是说localfile没有这个文件,但换成路径的时候,就能上传。谢谢了
小伙看你根骨奇佳,潜力无限,来学PHP伐。
key = 'my-python-logo.png'; #上传文件到七牛后, 七牛将文件名和文件大小回调给业务服务器。 policy={ 'callbackUrl':'http://your.domain.com/callback.php', 'callbackBody':'filename=$(fname)&filesize=$(fsize)' } token = q.upload_token(bucket_name, key, 3600, policy) localfile = './sync/bbb.jpg' ret, info = put_file(token, key, localfile) print(info) assert ret['key'] == key assert ret['hash'] == etag(localfile)
I don’t quite understand what you are talking about. Can you give me the values of key and localfile? First of all, make sure you have not passed the key and localfile backwards.
You can try django-qiniu-storage
I don’t quite understand what you are talking about. Can you give me the values of key and localfile?
First of all, make sure you have not passed the key and localfile backwards.
You can try django-qiniu-storage