haste-server icon indicating copy to clipboard operation
haste-server copied to clipboard

Add paste expiration for file storage configuration

Open C0rn3j opened this issue 8 years ago • 14 comments

staticMaxAge - max age for static assets (86400)

I see this line in README in the settings section, do you call pastes "static assets" and if so, does that mean they expire in a day by default?

Is that after last view or actual death time?

C0rn3j avatar Dec 28 '17 13:12 C0rn3j

Should be, from creation. Not last view.

⁣Sent from TypeApp ​

On Dec 28, 2017, 08:26, at 08:26, Martin [email protected] wrote:

staticMaxAge - max age for static assets (86400)

I see this line in README in the settings section, do you call pastes "static assets" and if so, does that mean they expire in a day by default?

Is that after last view or actual death time?

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/seejohnrun/haste-server/issues/191

geekism avatar Dec 28 '17 13:12 geekism

Nope these are the max age times for static assets like README (you can add others). You shouldn’t have to change this setting

Look for the expires key regarding hastes

On Thu, Dec 28, 2017 at 8:28 AM geekism [email protected] wrote:

Should be, from creation. Not last view.

⁣Sent from TypeApp ​

On Dec 28, 2017, 08:26, at 08:26, Martin [email protected] wrote:

staticMaxAge - max age for static assets (86400)

I see this line in README in the settings section, do you call pastes "static assets" and if so, does that mean they expire in a day by default?

Is that after last view or actual death time?

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/seejohnrun/haste-server/issues/191

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/seejohnrun/haste-server/issues/191#issuecomment-354288316, or mute the thread https://github.com/notifications/unsubscribe-auth/AAD9xakOuSpsdakrcYutRDs8-1Bmsfc7ks5tE5dsgaJpZM4ROUj6 .

seejohnrun avatar Dec 28 '17 14:12 seejohnrun

This is the extent of my config.js, I installed hastebin through this PKGBUILD on Arch - https://aur.archlinux.org/packages/haste-server-git/

Looking at the config.js in this repo, looks like I just have to throw the expire property to the storage block, so I did so.

  "storage": {
    "path": "./data","type": "file",
    "expire": 31536000
  },

Could the expire property be added to the README? I see that the different storing methods have a notion about the expire but it is not really described for the regular file storage option

C0rn3j avatar Dec 28 '17 16:12 C0rn3j

@C0rn3j expire does not work with file storage currently. We don't have a separate store where the expiration would be placed - and currently don't serialize them into the stored file. Could be a great idea for an enhancement if people want similar.

seejohnrun avatar Dec 28 '17 16:12 seejohnrun

expire does not work with file storage currently.

Could that be documented in the README?

We don't have a separate store where the expiration would be placed - and currently don't serialize them into the stored file. Could be a great idea for an enhancement if people want similar.

Would love to be able to set an expiration, whether it's at least max exp. on server side or perhaps even let have a shorter expiration on the client side. (my storage is limited)

For example - PrivateBin has a dropdown menu like this. Not saying that Hastebin should let client be able to set shorter expiration than the max, just throwing it out there as an idea. The clutter this adds to the otherwise very clean interface may not be worth it.

image

C0rn3j avatar Dec 28 '17 16:12 C0rn3j

@C0rn3j

  • We could add it to the README but I think it's already fairly clear when each storage type describes which options it supports. I'm open to a PR that makes it more clear though
  • Have you considered using non-file storage to support expiration? It's definitely a feature I could add but it may be a bit before I have time and I haven't heard this request before.
  • The client side expiration selection is nice, but I prefer to keep the interface free of distractions like that. Maybe an idea for a fork if you're interested!

seejohnrun avatar Dec 29 '17 16:12 seejohnrun

Have you considered using non-file storage to support expiration?

Yes, and while I could do that, it kinda kills the simplicity of the installation.

It's definitely a feature I could add but it may be a bit before I have time and I haven't heard this request before

I have time, better see it added later than never ^^

We could add it to the README but I think it's already fairly clear when each storage type describes which options it supports.

Am not sure about other people who are new to the project, but I myself was totally confused.

I'll re-title this Issue and see about a README PR.

C0rn3j avatar Dec 29 '17 19:12 C0rn3j

@C0rn3j Thanks - I'll keep following this issue and watch for more upvotes - and eventually get this done!

seejohnrun avatar Dec 30 '17 14:12 seejohnrun

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Mar 08 '22 14:03 github-actions[bot]

When it will be added?

ririko5834 avatar Mar 12 '22 14:03 ririko5834

Btw is the expire working for amazon S3?

ririko5834 avatar Mar 12 '22 14:03 ririko5834

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Apr 12 '22 02:04 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Apr 26 '22 02:04 github-actions[bot]

It isnt stale

ririko5834 avatar Apr 26 '22 13:04 ririko5834