mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-09 08:26:00 +02:00
[GH-ISSUE #1053] Long attachment expiration are not working.... #738
Labels
No labels
ai-generated
android-app
android-app
android-app
🪲 bug
build
build
dependencies
docs
enhancement
enhancement
🔥 HOT
in-progress 🏃
ios
prio:low
prio:low
pull-request
question
🔒 security
server
server
unified-push
web-app
website
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ntfy#738
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ctschach on GitHub (Mar 12, 2024).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1053
🐞 Describe the bug
I do use my own server for personal notification. Therefore I've extended the expiration date for attachments via the config file:
attachment-expiry-duration: "336h"This should give me a storage time of 14 days. Unfortunately this is not working. Attachements from 2+ days are not shown.
💻 Components impacted
Current version via docker running on Ubuntu 22.04 LTS
@wunter8 commented on GitHub (Mar 12, 2024):
Can you clarify what you mean by "attachments from 2+ days are not shown"?
@ctschach commented on GitHub (Mar 12, 2024):
Attachments send via ntfy more than 2 days ago are not shown…the messages are.
@wunter8 commented on GitHub (Mar 12, 2024):
In which client? (Android, web, iOS, PWA)
If you access the link associated with the attachment, does it load?
Are the attachments still in the attachments directory and simply cannot be accessed via the link?
@ctschach commented on GitHub (Mar 12, 2024):
I mainly use the PWA on MacOS, but it also happens on iOS.
But you are right, the attachments are gone form the attachment folder on the server. I only see todays attachments.
Could it be possible that my value is to high and therefore the application reverts back to the default?
@wunter8 commented on GitHub (Mar 12, 2024):
The default is 3h. Do you see anything in there that was created more than 3h ago? If not, it could be that the formatting in your server.yml file is slightly off, so your custom value might not be applied at all. I don't think there's any value that is "too high"
You can check your server.yml file using yamllint.com
@ctschach commented on GitHub (Mar 13, 2024):
Hi Checked the config file and it's syntactically correct (I mean there is not much you can do wrong):
I checked the attachment folder. And the latest entry I had was yesterday at around 5:00pm and this was gone this morning.
Is there a way to log the attachment cleaning process? The current log file does not mention anything about it.
@ctschach commented on GitHub (Mar 13, 2024):
So I now created a cron-job which will send a notification with an attached image to a new channel every hour. That will allow me to see how long attachments are kept. I'll report as soon as I have some data.
@ctschach commented on GitHub (Mar 14, 2024):
Okay, so no matter what I set in the config file. It looks like 24h is the maximum „ attachment-expiry-duration“ I can use or differently said: no matter what I set as duration, 24h is the longest you can get. Even „just“ setting it to 48h will only give me 24h.
@wunter8 commented on GitHub (Mar 14, 2024):
Hmm. Do you have any tiers set up? (
ntfy tier list)@ctschach commented on GitHub (Mar 14, 2024):
No
@wunter8 commented on GitHub (Mar 14, 2024):
Do values less than 24h work correctly?
@binwiederhier commented on GitHub (Mar 14, 2024):
Maybe it's the new duration parsing logic 😬 -- I can check later.
Obviously though attachments will not outlive their messages. So cache-duration has to be as high as the attachment duration
@ctschach commented on GitHub (Mar 14, 2024):
Okay, that's an interesting catch. But if I look that "cache-duration" has a default of 12h (and I've not changed this currently), why do attachments stay there for 24h.
But I've just increased the "cache-duration" to 48h and the same for the a "attachment-expiry-duration" - so let's see if this makes any difference
I'll test this also once I got some results from the above test.
@Mat-DB commented on GitHub (Aug 23, 2024):
Any updates on this?
@xi-ao commented on GitHub (Mar 24, 2026):
Any updates on this?