Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FileSystemOverwriteStorage #1252

Closed

Conversation

craigds
Copy link
Contributor

@craigds craigds commented May 22, 2023

Improved implementation of #1209

Background:

This ticket is going in loops:

Refer https://code.djangoproject.com/ticket/28144

I guess django-storages apparently did once have this class, and it was removed.

Per that above ticket, Django later added a fix to make it possible to override the not-overwriting behaviour (an OS_OPEN_FLAGS attribute)

Looks like there was (a LONG time ago) some discussion about including this feature in Django: https://code.djangoproject.com/ticket/4339 (it was closed wontfix due to the trivial nature of a custom implementation)

So, that puts us back here - we need somewhere to store that custom implementation, and django-storages seems like the right project for the job...

I've added a test and some basic docs (I don't think much is required, since there's no special configuration etc, unlike the other backends)

@craigds craigds force-pushed the filesystemoverwrite-storage branch from d0f47db to d19266a Compare May 22, 2023 08:37
@craigds
Copy link
Contributor Author

craigds commented Feb 13, 2024

any chance of a review here?

@jschneier
Copy link
Owner

I'm happy to accept this but am a bit concerned about drift from core.

As an example get_available_name has already drifted because validte_file_name is not called.

@jschneier
Copy link
Owner

This one seems likely to land into upstream so going to close here.

See: django/django#18020

@jschneier jschneier closed this Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants