#34541: StorageRouter
-------------------------------------+-------------------------------------
     Reporter:  Vasanth              |                    Owner:  nobody
         Type:  New feature          |                   Status:  new
    Component:  File                 |                  Version:  4.2
  uploads/storage                    |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Description changed by Vasanth:

Old description:

> With the recent addition of STORAGES, would it it possible to have a
> StorageRouter that mimics the functionality of the DatabaseRouter but for
> files/storage classes.
>
> Since the storage callable in Filefields are called during build, it
> cannot be used to dynamically set the storage class during runtime.
>
> However dynamically setting the storage class would be particularly
> useful for cases where data for specific models needs to stored elsewhere
> or for SaaS backends provide independent and isolated buckets for each
> client/subdomain.
>
> In case of fields that have a field level storage class and
> StorageRouter, priority has to be resolved by the router.
>
> Related to #34540

New description:

 With the recent addition of STORAGES, would it be possible to have a
 StorageRouter that mimics the functionality of the DatabaseRouter but for
 files/storage classes?

 Since the storage callable in Filefields are called during build, it
 cannot be used to dynamically set the storage class during runtime.

 However dynamically setting the storage class would be particularly useful
 for cases where data for specific models needs to stored elsewhere or for
 SaaS backends provide independent and isolated buckets for each
 client/subdomain.

 In case of fields that have a field level storage class and StorageRouter,
 priority has to be resolved by the router.

 Related to #34540

--

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34541#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070187e8097c83-b9e25071-791b-4e80-a8b9-cc1d0fb12c16-000000%40eu-central-1.amazonses.com.

Reply via email to