It is possible, but the documentation is terrible. To get started, you need to configure CORS in the basket you load into:
gsutil cors set cors.json gs://bucket-name
Where it cors.jsoncontains something like:
[{
"maxAgeSeconds": 3600,
"method": ["GET", "PUT", "POST"],
"origin": [
"http://localhost:3000"
],
"responseHeader": ["Content-Type", "Cache-Control"]
}]
"Cache-Control" "responseHeader". , , Cache-Control. fetch :
fetch(uploadUrl, {
method: 'PUT',
body: blob,
headers: {
'Content-Type': blob.type,
'Cache-Control': 'public, max-age=31536000',
},
});