Answer the question
In order to leave comments, you need to log in
How to add audio files by url to the database using django?
Let's say I have a song on my computer that I want to add to my django project. But I want to do this not through the admin panel or the form, but directly, through the path.
more details:
there is a model
class Audio(models.Model):
url = models.FileField(upload_to='records/%m/')
audio.url = '/storage/usbdisk1/mikopbx/astspool/monitor/2021/03/20/12/mikopbx-1616233798.4_jX36V8.mp3'
audio.save()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question