Skip to content

Commit

Permalink
Merge pull request #1644 from SanjalKatiyar/fix_preview_s3
Browse files Browse the repository at this point in the history
Fix object preview
  • Loading branch information
openshift-merge-bot[bot] authored Oct 17, 2024
2 parents 9df34c8 + d93a22a commit 768425f
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ const getObjectURL: GetObjectURL = async (bucketName, object, noobaaS3) => {
Bucket: bucketName,
Key: getName(object),
});
const blob = await new Response(responseStream.Body as ReadableStream).blob();
let blob = await new Response(responseStream.Body as ReadableStream).blob();
blob = blob.slice(
0,
blob.size,
responseStream.ContentType || 'application/octet-stream'
);

return window.URL.createObjectURL(blob);
};
Expand Down

0 comments on commit 768425f

Please sign in to comment.