3 ms·
Sorry, this comment doesn't necessarily add to the discussion, but as I noticed the founders posting here, this is directed at them: Just looking through the D
by bmelton 14y ago
Sorry, this comment doesn't necessarily add to the discussion, but as I noticed the founders posting here, this is directed at them:
Just looking through the Django implementation docs, it appears as though it defines a pyuploadcare.dj.FileField model field to use on my models, which is great and all, but seems like it's limiting at first glance. Is that to mean that each model can only have one file attachment?
What's the recommended workaround for the pretty common use case of having multiple files attached to a single model? A separate model table with a foreignkey?
- va1en0k 14y agoHi! We're working on several things you can do to avoid having a separate table, make sure to be in touch :-) Please continue to provide feedback, it's very valuable to us, thank you!
- va1en0k 14y agoAnd, of course, you can use multiple different dj.FileFields for that in one model, if you need only a limited number of images.
- bmelton 14y agoOh, I don't mind using a separate table or anything, I'm just not entirely sure if, because you're storing the files, whether or not that changes the default paradigm. I might have worded my initial question poorly: but I could very easily have seen if the FileFields field stored a link to a bucketized URL or something, or even an array of URIs. If it's one-to-one, then that's fine, and actually means less changes to my code; I'm just not sure. Obviously, a quick prototype will show me exactly how to implement, but I thought I'd ask while the question was hot.
- va1en0k 14y agoFor now, it can be only a separate table. In the future, of course, there're going to be buckets and everything, stay tuned! If you have some specific ideas about this in mind, my email is valentin@uploadcare.com