From 6d3f72a786f56ef4ae7bfef2814ec8b8fca303e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sede=C3=B1o?= Date: Wed, 5 Mar 2025 08:18:00 +0100 Subject: [PATCH] Not remove the files in the temp directory (now is possible to be in a shared directory) --- models/CBWIREController.cfc | 7 ------- 1 file changed, 7 deletions(-) diff --git a/models/CBWIREController.cfc b/models/CBWIREController.cfc index de873c7d..76c4bac6 100644 --- a/models/CBWIREController.cfc +++ b/models/CBWIREController.cfc @@ -135,13 +135,6 @@ component singleton { if( !directoryExists( local.storagePath ) ){ directoryCreate( local.storagePath ); } - // Cleanup files in the storage path by checking for files older than 1 days - local.files = directoryList( path=local.storagePath, recurse=true, type="file", listInfo="query" ); - local.files.each( function( _file ) { - if( dateDiff( "d", _file.DateLastModified, now() ) > 1 ){ - fileDelete( _file ); - } - } ); // Verify the signed URL, throw 403 if invalid if( !verifySignedUploadURL( expires=event.getValue( "expires" ), signature=event.getValue( "signature" ) ) ){ return event.renderData( statusCode=403, statusText="Forbidden", data="Invalid signed URL." );