javascript - Managing temp files -
i have website developed django deals big number of tiff files consist of lot of layers. in order give user ability browse layers, extracted layer , saved them jpegs in temp folder when user chooses tiff file, , can browse layers. problem is bad idea keep jpegs stored next browsing request! suggestions manage extracted jpegs when requested , rid of them?
use tempfile library
import tempfile tempfile.namedtemporaryfile() temp: temp.write('some data') temp.flush()
Comments
Post a Comment