Visit the Qiniu download link to download apk and {"error": "download token auth failed"} appears.

  1. the same resource can sometimes be downloaded and sometimes cannot be downloaded. (currently, it is found that the current), key is uploaded and stored in our mysql table. When I download it, I take the key, from the table and splice the download link.

func (mac * Mac) Sign (data [] byte) (token string) {

h := hmac.New(sha1.New, mac.SecretKey)
h.Write(data)

sign := base64.URLEncoding.EncodeToString(h.Sum(nil))
return fmt.Sprintf("%s:%s", mac.AccessKey, sign)

}
code is encoded using secure urlbase64.

I copy the link to the browser and I can see

in Chinese.
Mar.31,2021

this is because some nodes of the test domain will report a 401 error, so the same link can sometimes be downloaded and sometimes cannot be downloaded.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e43b7a-58fde.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e43b7a-58fde.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?