Skip to content
Snippets Groups Projects
Commit c62bd4ff authored by Igor Markin's avatar Igor Markin
Browse files

Remove random number from backblaze request tail

parent 96431eed
No related branches found
No related tags found
1 merge request!77Resolve "Investigate issue with the caching of files in backblaze"
......@@ -34,12 +34,7 @@ class CloudflareService {
fileName: string,
bucket = this._defaultBucket
): Promise<{ data: T; uploadTime: number }> {
// v?= is a dirty fix to prevent caching of the CORS error response in case file is missing.
// Because of browser caching CORS error in case of missing file, it's not possible to retrieve it when it's being uploaded.
// Dig into https://www.backblaze.com/b2/docs/cors_rules.html and fix
const response = await axios(
`${this._cdnUrl}/file/${bucket}/${fileName}?v=${Math.random()}`
);
const response = await axios(`${this._cdnUrl}/file/${bucket}/${fileName}`);
const data = response.data as T;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment