Skip to content

[FEATURE] Allow to ignore non-image files (pdf, webm, mp4, mp3, etc.) #387

@Vadorequest

Description

@Vadorequest

Is your feature request related to a problem? Please describe.
I want to use the CDN as a multi-purpose CDN, I wish it would behave differently when loading a PDF file, for instance

https://cdn.the-funding-place.unly.org/exe-v4/ece-v4-flyer-partenariat-caisse-depargne455.pdf will show an error, but I'd like to prompt a download instead.

It doesn't really make sense to use multiple CDN for different file types, it makes things more complex to manage.
So, I believe we should have a way to make the app behave differently depending on the file being manipulated.

The most logical choice would be that any type that isn't handled would prompt a download, I don't think we need more than that at this time, it'd be a good default behavior.

Describe the feature you'd like
Prompt a download when a file type isn't handled (pdf, etc.)

Additional context
This doesn't seem to be officially supported, but here are a few workarounds:

  • can't bypass non-image file #49 (comment) Change the code to do something different (this should probably be added to this repository to provide good sensible default while still allowing people to customise even deeper). Unfortunately, this workaround is poorly documented and I'm not sure what I should do.
  • can't bypass non-image file #49 (comment) Add bypasses on the CloudFront Behaviors manually, this shouldn't be necessary

Could we get a better default behavior?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions