Open
Description
Hi,
i am use your django-ajax-uploader it work properly it uploded image but now i want to save his patyh in models in django for that i am use signal mention in doc
in models.py
class Product_image(TranslatableModel):
translations = TranslatedFields(
product = models.ForeignKey('Product', verbose_name=_('Product'), null=True, blank=True),
document = models.FileField(upload_to='attachments/%Y/%m/%d',blank=True, null=True),
)
@receiver(file_uploaded, sender=AjaxFileUploader)
def create_on_upload(sender, backend, request, **kwargs):
Product_image.objects.create(document=backend.path)
def __str__(self):
return str(self.product)
image uplod in upload folder properly but path not save in models
how can i get this
Thanks in advance!!!
Metadata
Metadata
Assignees
Labels
No labels