gentics / mesh

Gentics Mesh - The open source headless CMS for developers
https://getmesh.io
Apache License 2.0
570 stars 115 forks source link

How to deliver binaries (assets) directly via nginx? #929

Open ghost opened 4 years ago

ghost commented 4 years ago

Hello,

I'd like to put an Nginx in front of the CMS in order to directly deliver all assets/binaries (images, audio/video files) from the file-system without hitting the CMS. How can I achieve this?

Thanks, Marc

Jotschi commented 4 years ago

You can only serve the files from the upload folder directly. There is no other way to achieve this. In the future it might be possible to utilize an S3 storage but support for this has not yet been finished.

ghost commented 4 years ago

You can only serve the files from the upload folder directly. There is no other way to achieve this. In the future it might be possible to utilize an S3 storage but support for this has not yet been finished.

Thanks for your reply! Yes, I thought the same - serving the files from the upload directory. The question is, how this can be done as the files in the upload directory have a checksum/hash/id as filename and the file ending .bin. Do you know how a URI path to a binary file can be build (from which node attributes) and the other question is if Nginx and the webbrowser likes the file ending ".bin" instead of e.g. "jpg" or "m4a".