I'm sort of struggling to understand the documentation for BackBlaze B2, I want to download files from a private bucket using PHP, I know the file ID and I want to get authorization (like 30 seconds) and then generate a download link (Presigned?).
I'm just not quite sure how to put the example codes all together, pardon my ignorance.
I spent a while looking for the answer to this as well. Apparently it is possible.
Essentially the steps are as follows:
So you'll get something like https://api001.backblazeb2.com/file/bucket-name/path/to/file?Authorization={token}
You can restrict the length of time that the auth token is valid, and restrict it so that only files which have a particular prefix can be accessed. So if you want to make a particular private file available to a particular user that you've already authenticated, you can use these steps to generate a token with a short lifetime that only works for the specific file (by using the full file name as the prefix).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.