samvera / serverless-iiif

IIIF Image API 2.1 & 3.0 server in an AWS Serverless Application
https://samvera.github.io/serverless-iiif/
Apache License 2.0
71 stars 23 forks source link

Question: can the IIIF image server simply return files that are not images #82

Closed ryantomaselli closed 1 year ago

ryantomaselli commented 2 years ago

Hey guys;

If I wanted to have the IIIF server simply return files that aren't images (for example an mp4 file)...is there a recommended approach?

mbklein commented 2 years ago

If you use the CloudFront-enabled flavor, you can add additional origins and behaviors to the distribution it creates. I’ll have to give some thought to the best way to do that within the framework of a SAM deployment/CloudFormation stack, but you can play with the concept by making manual changes to the CloudFront distribution in the AWS console.

fitnycdigitalinitiatives commented 2 years ago

We have all our images commingled on the same bucket with resources of all media types, and only in cases where our digital repository identifies the file as an images does it access it specifically through the IIIF server—everything else (videos, audio, pdf) is just accessed directly through the s3 endpoint with a presigned URL. Curious, is there a value you're trying to gain by also having non-images pass through the IIIF server or is it more a convenience thing?

ryantomaselli commented 2 years ago

If you use the CloudFront-enabled flavor, you can add additional origins and behaviors to the distribution it creates. I’ll have to give some thought to the best way to do that within the framework of a SAM deployment/CloudFormation stack, but you can play with the concept by making manual changes to the CloudFront distribution in the AWS console.

Thanks @mbklein! I'll do some tinkering...that is a good pointer.

ryantomaselli commented 2 years ago

We have all our images commingled on the same bucket with resources of all media types, and only in cases where our digital repository identifies the file as an images does it access it specifically through the IIIF server—everything else (videos, audio, pdf) is just accessed directly through the s3 endpoint with a presigned URL. Curious, is there a value you're trying to gain by also having non-images pass through the IIIF server or is it more a convenience thing?

Thanks @fitnycdigitalinitiatives, It is more of a convenience thing at this point.

ryantomaselli commented 2 years ago

I ended up creating a separate distribution for serving all files that aren't images.