bartTC / django-attachments

A generic Django application to attach Files (Attachments) to any model.
BSD 3-Clause "New" or "Revised" License
296 stars 90 forks source link

Use in multitenant applications #37

Closed amitjindal closed 6 years ago

amitjindal commented 7 years ago

Hi Martin (@bartTC),

Thanks for this module. This is really great and I am enjoying using this. I wanted to know how I can do the following (if possible):

  1. I want to use this with django-tenant-schemas. For this to work, I need a way to change where the files are stored to include a tenant id in the path. How would I do this? Is there a function I can define in setting that allows me to customize the path per tenant?

  2. Again for the case above I need to add authorization so that files from one schema cannot be seen/opened by another. That means there needs to be an interceptor for such requests. Any suggestion regarding this?

  3. Even within the same schema/tenant I want to restrict files (if someone directly enters a URL) to be restricted to owner. How can I do this?

  4. Instead of filenames, I would like to rename the files as UUID/GUID. Is there something I can define or override to do this?

Thanks Amit

amitjindal commented 6 years ago

Hi @bartTC , You are probably busy. If you just give me a tip or a pointer I will definitely try to figure this out.

Thanks Amit

bartTC commented 6 years ago

@amitjindal sorry but I can not provide basic Python language support here. If your question is, if django-attachments will support any of above features, then probably no. All of them sound very specific to your project. I suggest you fork the project and alter it, so it fits your needs.

amitjindal commented 6 years ago

@bartTC Ok Thanks. I was not asking for basic language support but merely if django-attachments has any of these features.