Yeah! Or you can write your own method to upload_to. It is easy too.
I've made a simple example:
https://gist.github.com/rodrigo-zayit/604da297d9c30e7d
This example save the pictures in:
media/images/products/1/product-slug/randomstring.ext
Where "1" is the id of the product's category.
On 26.02.2015 02:30, 163 email wrote:
> yes , what i mean is "media files".
> there are so many file,may be several thousands ,to be uploaded
> from client to server.
> if all files in one dir , it'll be slow.
> but i don't find any way put files in different dirs just using django.
> now i writ
es in different dirs ,but it complex.
is there any easy way ?
Thanks !
163 email
From: Rodrigo Zayit
Date: 2015-02-25 23:36
To: django-users
CC: paiis314
Subject: Re: how to put files in different dirs
Hi!
I didn't understand your question. You don't need to put all your files in t
Hi!
I didn't understand your question. You don't need to put all your files in
the same dir... you can create folders like "images", "images/products",
"css", "js", etc
Or are you asking about "media files"? I mean, files that will be uploaded
through admin area...?
Best regards,
Rodrigo Z
4 matches
Mail list logo