Skip to content

Commit

Permalink
Merge pull request #132 from LCOGT/fix/immutable-headers
Browse files Browse the repository at this point in the history
modify blob object instead of headers
  • Loading branch information
LTDakin authored Dec 5, 2024
2 parents a65c4f9 + 553442f commit 349ef3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/stores/thumbnails.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,14 @@ export const useThumbnailsStore = defineStore('thumbnails', {
if (cachedUrl === undefined || cachedUrl === ''){
return getImageFromBasename(size, archive, url, basename).then((response) => {
if (response){
// Convert to image/jpeg for caching as S3 presigned URLs blobs default to binary/octet-stream
response.headers.set('content-type', 'image/jpeg')
return response.blob()
}
return undefined
})
.then((responseBlob) => {
if (responseBlob) {
// Convert to image/jpeg for caching as S3 presigned URLs blobs default to binary/octet-stream
responseBlob = new Blob([responseBlob], {type: 'image/jpeg'})
const responseUrl = URL.createObjectURL(responseBlob)
if (size == 'large'){
this.largeThumbnailsCache.set(basename, responseUrl)
Expand Down

0 comments on commit 349ef3b

Please sign in to comment.