简体   繁体   中英

pyramid static view and file upload

I created new directory via 'myimages' under static directory. And whenever user upload files, file get stores in that directory. Once file uploaded I can access that on html using '/static/myimages/imagename.png'. It works fine whenever I am uploading new image. But whenver I try to override image. It shows me old image only.

I manually check in directory. It has new image, but still when I try to access that via browser, it gives me old image.

This sounds like your browser is caching the images. Try setting the cache_max_age=0 on your add_static_view , or viewing the page in your browser's incognito mode where it'll use a different cache.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM