Expense documents disappear after 1 year?

Is there any reason why I can’t find my expense documents ( pdf copies of receipts ) in the …/storage/documents folder, that are from previous years than the current one? Are previous years’ documents removed, or is there a setting for this somewhere? Thanks to whoever reads and/or can help explain how “local” document storage works when you upload files for expenses. Currently, I am getting a 500 server error when I try to view past documents.

Hi,

Are there any details about the 500 error in storage/logs?

Hi, thank you! Yes, there is! I think the error(s) is that the file is not found at path. The question I am grappling with is if this is a hosting issue or a setting in invoice ninja? I wonder why files would be missing but the latest uploaded documents are able to be viewed.

Here is an example from the error log. I deleted my name and the full file paths, just in case.

[2023-03-29T13:35:57.683892+00:00] production.ERROR: Illuminate\Contracts\Filesystem\FileNotFoundException [0] : => File not found at path: qr5ssmmi2l7or9b7ixcebfxdgynv88dy/ec6cc2e04bfef72aa8221330a3fb608d4c4fdf4a.pdf {“context”:“PHP”,“user_id”:1,“account_id”:“1”,“user_name”:“”,“method”:“GET”,“user_agent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36”,“locale”:“en”,“ip”:“85.24.212.138”,“count”:11,“is_console”:“no”,“is_api”:“no”,“db_server”:“mysql”,“url”:“documents/98/Adobe_Transaction_No_1564314293_20220107.pdf”} []
[2023-03-29T13:35:57.684370+00:00] production.ERROR: [stacktrace] 2023-03-29 01:35:57 File not found at path: qr5ssmmi2l7or9b7ixcebfxdgynv88dy/ec6cc2e04bfef72aa8221330a3fb608d4c4fdf4a.pdf: #0

I’m not sure, is it possible the app was moved at some point?

No, I don’t think so. I tried to migrate to v5 some months ago but gave up on the process due to some issues getting it to work. Maybe this could cause some files to get deleted in the storage. Anyhow, it’s not the end of the world, I have backup copies of the files somewhere. I just wondered if anyone has heard of this happening or if there perhaps was a setting I missed that deletes files after a certain number of days…

I’m not sure what would explain it, the migration doesn’t affect the v4 account. Old documents are never deleted by the app.

Thanks! Good to know! I think it’s possibly a hosting issue then. I’ll look further into it and see if I can figure out what the issue is. Thanks again for your prompt responses.