Re: 2020 edition of core.files.storages.Storage.copy method

2020-09-02 Thread Adam Johnson
>From what I can see in the original PR, it was closed fairly quickly by the author, without debate. I think the option of using FileExistsError for pre-existing files, even on "non-OS filesystems" like S3, is fine. At the end of the day there's an operating system somewhere, and it's better than

Re: 2020 edition of core.files.storages.Storage.copy method

2020-09-02 Thread Lorenzo Peña
Some extra context: in https://docs.djangoproject.com/en/3.1/topics/files/ there is a code example that uses `os.rename`. I consider this behavior to be needed quite often on some scenarios, except that the specific implementation of `rename` will depend on the storage being used. El miércole

Re: 2020 edition of core.files.storages.Storage.copy method

2020-09-02 Thread Lorenzo Peña
Apologies for the lazy version. Let me elaborate a bit more :) >From what I read, the blocker last time was a lack of a clear path in how to handle a "file already exists" type of error. [1] In my case, the need for a 'copy' method arose from a two step upload flow: first step is to upload the

Re: 2020 edition of core.files.storages.Storage.copy method

2020-09-02 Thread Carlton Gibson
Hi Lorenzo. You’re asking folks to do quite a lot of homework there. Any chance you could summarise the previous discussions and explain at least, why this might be a good feature, and why (presumably) it was a no-go last time? I think there’s more chance of positive input that way. 🙂 Kind

2020 edition of core.files.storages.Storage.copy method

2020-09-02 Thread Lorenzo Peña
Hi everyone! About providing an interface 'copy' method for file storages, is this still no-go as of 2020? Background reading: - https://github.com/jschneier/django-storages/issues/428 - https://code.djangoproject.com/ticket/20488 - https://github.com/django/django/pull/4244 Thanks! -- You re