Al momento ho 2 sedi di immagini e possono i formati (jpg, jpeg, png, gif)Come forzare il download di file nel browser, il server nginx
i.domain.com/simage.jpg thumbnail
i.domain.com/image.jpg high quality
i.domain.com/o/image.jpg full resolution
qualcuno sa come posso forzare i file di immagine in/o/per scaricare anziché eseguire il rendering nel browser web?
Ecco il mio file di configurazione: http://pastebin.com/dP8kZMzx
#setup subdomain i.domain.com
server {
server_name i.domain.com;
access_log /var/log/nginx/i..com.access.log;
error_log /var/log/nginx/i.domain.com.error.log;
root /var/www/domain.com/test1/images;
index index.php index.html index.htm;
#error_page 403 = /notfound.jpg;
#error_page 500 = /notfound.jpg;
location/{
#change this to a 404 img file .jpg
try_files $uri $uri/ /notfound.jpg;
rewrite "/s([A-Za-z0-9.]+)?" /small/$1 break;
rewrite "/o/([A-Za-z0-9.]+)?" /orig/$1 break;
rewrite "/([A-Za-z0-9.]+)?" /medium/$1 break;
}
}
che ha provocato un errore 404:/ – eeek
Questo collegamento funziona per me: http: //210mike.com/force-file-download-nginx-apache/ posizione ~ * (. * \. pdf) { types {application/octet-stream .pdf; } default_type application/octet-stream; } – learnJQueryUI