how are you sending the files from the client?
It seems to me you're reading the files metadata but you are not accessing
the image binaries to store them.

Look at this example. It's made in angular but it can give you an idea:

https://github.com/cardanovalley/cardano-directories/blob/http-post-store/src/app/add-your-store/add-your-store.component.ts

https://github.com/cardanovalley/cardano-directories/blob/http-post-store/src/app/add-your-store/add-your-store.component.html

In this case the backend is done with Django Rest Framework so just sending
the data as the framework expected make it work:
https://github.com/cardanovalley/cardano-directories-api/tree/setup-for-forms

El sáb, 20 de nov. de 2021 a la(s) 02:06, Alam Khazi (
ala...@rohteksolutions.com) escribió:

> Hi,
> By using Vuejs, Axiox and Django, Uploading multiple images. After
> uploading images are getting in list and then those list of images names we
> are storing into backend in ImageField image is saving into database but
> not saving into media folder.
>
>
> ['nature6.jpg', 'nature5.jpg', 'nature4.jpg', 'nature3.jpg',
> 'nature2.jpg', 'nature1.jpg', 'nature.jpg']
> ```
>     if request.method == "POST":
>         # From template we are fetching values
>         data = json.loads(request.body)
> images = data['images']
>         saveform = vk_service(image=images[0],
> image2=images[1],
>  image3=images[2],
>  image4=images[3],
>  image5=images[4],
>  image6=images[5],)
> ```
> Images are saving into database but not saving in media folder.
> Please help me out to solve this issue.
>
> Thanks
> ~Salima
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CABscGkSJ66hXxyOOZYfLSbaAH-Wc89QogQXX%3DVeMFheghJJp2A%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CABscGkSJ66hXxyOOZYfLSbaAH-Wc89QogQXX%3DVeMFheghJJp2A%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAF6hzDNsbb7pY9Cg8eQrMWiyYTyqedFLF2WfkSQwWbfFi62L8A%40mail.gmail.com.

Reply via email to