Tag : Seven Cows Cloud Storage

http://docs.qiniu.com/ruby-sdk/v3/index.html#generate-upload-token Qiniu::RS.generate_upload_token :scope => target_bucket, :expires_in => expires_in_seconds, :callback_url => callback_url, :callback_body => callback_body, :callback_body_type => callback_body_type, :customer => end_user_id, :escape => allow_upload_callback_api, :async_options => async_callback_api_commands, :return_body => custom_response_body I use JavaScript to upload. params are also specified in the upload form. The business server parameter successfully obtained the params parameter content. The content specified ..

Read more

I uploaded the file through the go sdk and set the callback address and parameters, but after the execution, I will prompt the error “JSON: cannotunmarshal stringinto go value of typestorage.putret”. although the prompt is wrong, in fact I can successfully execute the callback interface and resolve the parameters. callbackURL := “xxx.xxx.xxx” callbackBody := fmt.Sprintf(“{\”key\”:\”$(key)\”,\”token\”:\”%s\”}”, ..

Read more

Using the go SDK of qiniuyun to upload files, according to the official process, no token can be obtained. var ( //Set the upload space bucket = “yourbucket” ) //Construct return value field type PutRet struct { Hash string `json:”hash”` Key string `json:”key”` } func main() { //initialize AK, SK conf.ACCESS_KEY = “ACCESS_KEY” conf.SECRET_KEY = ..

Read more

In the upload strategy, the image processing method is used for persistent processing. Why can’t it work? Go code is as follows:putPolicy := rs.PutPolicy{Scope: consts.QINIU_BUCKET + “:” + name,Expires: 300,FsizeLimit: int64(size),MimeLimit: mimeType,PersistentOps: “imageView2/0/w/480/h/480/format/jpg|saveas/” + name,} Is there any problem with the usage? The content after saveas needs to use seven cowsFormat of encodedUriFor specific examples ..

Read more

Question 1:Scope will report an error after specifying bucket:key: {“error”:”bad token”} scope will only specify bucket without error. Why? Question 2:Under the directory src/github.com/qiniu/api/rs, after ak,sk,bucketName,domain are filled in, go test is executed with error:-fail: testentry (0.33s)rs_api_test.go:74: {“error”:””,”reqid”:”4FcAAK-3snaLN70T”,”details”:[“RS/403″],”code”:403} — FAIL: TestGetPrivateUrl (0.30s)panic: runtime error: slice bounds out of range [recovered] panic: runtime error: slice bounds ..

Read more