Compatibility with an external file storage separated in pub/ and priv/

This commit is contained in:
Raphael Michel
2018-03-20 09:32:20 +01:00
parent 511cdbbfe2
commit 840cee206a
7 changed files with 14 additions and 11 deletions

View File

@@ -86,7 +86,7 @@ class ItemCategory(LoggedModel):
def itempicture_upload_to(instance, filename: str) -> str:
return '%s/%s/item-%s-%s.%s' % (
return 'pub/%s/%s/item-%s-%s.%s' % (
instance.event.organizer.slug, instance.event.slug, instance.id,
str(uuid.uuid4()), filename.split('.')[-1]
)