Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

How to validate against S3 for file existance

$
0
0
I want to use NGINX as a director where the following logic would take place:

+ Request for an asset comes from the web

++ Taking the path of the file - check if this file is already under my s3 bucket -http://$s3_bucket/$url_full

+++ If file exists then redirect the request to "http://$s3_bucket/$url_full"
+++ If file does not exist then serve it directly from the local drive and trigger a shell command.

Thank you for any help on this.

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>