Sfoglia il codice sorgente

Merge pull request #24205 from overleaf/ar-log-additional-information-when-getting-a-file-from-filestore

[web] Gather information about files with no hash

GitOrigin-RevId: 7f509c13f14902a40ae39bf1889103274de23040
Andrew Rumble 1 anno fa
parent
commit
f045361b49

+ 6 - 0
services/web/app/src/Features/FileStore/FileStoreController.mjs

@@ -67,6 +67,12 @@ async function getFile(req, res) {
         ))
         ))
     } else {
     } else {
       // The file-hash is missing. Fall back to filestore.
       // The file-hash is missing. Fall back to filestore.
+      if (!Features.hasFeature('filestore')) {
+        logger.warn(
+          { file, fileId, projectId },
+          'filestore feature is disabled but we will attempt to fetch the file from filestore'
+        )
+      }
       stream = await FileStoreHandler.promises.getFileStream(
       stream = await FileStoreHandler.promises.getFileStream(
         projectId,
         projectId,
         fileId,
         fileId,