User data exports do not expire after 48 hours

When you create an export of your user data, the notification message says

The above download link will be valid for 48 hours.

However, that does not seem to be the case: the file can still be downloaded after 48 hours (verified here on Meta)

The retain_hours field in the Upload model does not seem to be actually used anywhere.

7 Likes

Hmm any changes needed here @tgxworld?

5 Likes

@techAPJ Can you have a look at this? The validity of user exports regressed in FIX: create upload record for exported csv files · discourse/discourse@91bf10b · GitHub when the user exports were changed to be backed by uploads record. I was going to make a change to clean up user exports after 48 hours but saw a spec in the commit that says not to clean up user exports. The following method and a scheduled job to clean up the user exports isn’t working anymore because the exports are not in the custom csv_exports directory which we should probably clean up as well.

This seems to be intentional and was added way back in 2014. I’m not sure if we still need to support it? @sam

5 Likes

Another thing I realized is that (it looks like) user data exports are served over the CDN if that is configured.
That doesn’t seem like a good idea?

I don’t see any particular reason to remove this, the api is still tested and should work, no?

Yup the API still and can work but I just wasn’t sure if we required that feature anymore.

2 Likes

Fixed via:

https://github.com/discourse/discourse/commit/7b194743d7e10a425086d52c8e8ddd42ce1856f3

5 Likes

This topic was automatically closed after 2 days. New replies are no longer allowed.