0

I have an image in NIfTI (nii.gz) format stored in an S3 bucket. I want to display this in my React frontend using Papaya viewer, sending it via a Node/Express backend. How do I download the file and send it across? I can use the getObject method, but then I'm stuck.

const imgUrl = s3.getObject({
  Bucket: bucketName,
  Key: objectKey,
})

I'd be happy with giving the user a link to download the file from and manually upload it to Papaya viewer, I initially tried using a pre-signed URL to perform getObject, but instead of downloading the file, it just opened another tab rendering a white square. I suspect the NIFTI format makes things more difficult.

Has anybody done this?

0 Answers0