use cache more modified files

so that the client dir never has to be written to
This commit is contained in:
aronwk-aaron
2022-12-17 01:47:10 -06:00
parent 0fea032938
commit 785357475d
4 changed files with 25 additions and 7 deletions

View File

@@ -460,7 +460,7 @@ def prebuilt(content, file_format, lod):
# else we handle getting the files for lddviewer
elif file_format in ["obj", "mtl"]:
# check to see if the file exists
cache = pathlib.Path(f'app/cache/BrickModels/{filename}.lod{lod}.{file_format}')
cache = pathlib.Path(f'{current_app.config["CACHE_LOCATION"]}BrickModels/{filename}.lod{lod}.{file_format}')
if not cache.is_file():
# if not make it an store it for later
cache.parent.mkdir(parents=True, exist_ok=True)