---
title: "Discussion on \"How to upload Multiple Images with Django Rest Framework\" | Hashnode"
description: "Discussion on \"How to upload Multiple Images with Django Rest Framework\". Why do we need multiple image uploads?\nIn modern applications images have become very important for a better user interface and experience. Let's assume we are to build an e-commerce application or a social media platform like Instagram. I believe we..."
url: "https://hashnode.com/posts/how-to-upload-multiple-images-with-django-rest-framework/638cc640aae902a0052c9902"
---

[Feed](https://hashnode.com/feed) /

Discussion

[Odulaja Philip Temitayo](https://hashnode.com/@odulajaphilip)

Software Engineer | Python Instructor

Dec 4, 2022

# [How to upload Multiple Images with Django Rest Framework](https://philipodulaja.hashnode.dev/how-to-upload-multiple-images-with-django-rest-framework?utm_source=hashnode&utm_medium=feed)

Why do we need multiple image uploads? In modern applications images have become very important for a better user interface and experience. Let's assume we are to build an e-commerce application or a social media platform like Instagram. I believe we...

philipodulaja.hashnode.dev 9 min read

[#django](https://hashnode.com/tag/django) [#django-rest-framework](https://hashnode.com/tag/django-rest-framework) [#developer](https://hashnode.com/tag/developer) [#python](https://hashnode.com/tag/python) [#programming-blogs](https://hashnode.com/tag/programming-blogs) [#python-projects](https://hashnode.com/tag/python-projects)

## Responses 3

Markdown supported · ⌘↵ to post

[Peter Kimbeghi](https://hashnode.com/@dtechshoemaker)

Frontend Developer & Technical Writer

[Oct 18, 2023](https://hashnode.com/posts/how-to-upload-multiple-images-with-django-rest-framework/638cc640aae902a0052c9902/comment/652f25b2dc25532f4537e3db)

Great piece man, this article is a life saver

[Odulaja Philip Temitayo](https://hashnode.com/@odulajaphilip)

Software Engineer | Python Instructor

[Oct 18, 2023](https://hashnode.com/posts/how-to-upload-multiple-images-with-django-rest-framework/638cc640aae902a0052c9902/comment/652f25b2dc25532f4537e3db#reply-652f4903dc25532f4537e5e2)

Thanks for your comment!

[Augustine Ikhide Imoleme](https://hashnode.com/@Belved10)

Software Developer @PrimeClick Media

[Oct 13, 2023](https://hashnode.com/posts/how-to-upload-multiple-images-with-django-rest-framework/638cc640aae902a0052c9902/comment/65291e7605fdd5009606a741)

How do I modify the code to handle instances where an image is not provided but I still want it to be saved.

[Odulaja Philip Temitayo](https://hashnode.com/@odulajaphilip)

Software Engineer | Python Instructor

[Oct 13, 2023](https://hashnode.com/posts/how-to-upload-multiple-images-with-django-rest-framework/638cc640aae902a0052c9902/comment/65291e7605fdd5009606a741#reply-65296e21d2fa06034fe34d03)

What exactly do you want to save? since the image is not provided

[Olajide Igbalaye](https://hashnode.com/@Ryticle)

Eternal Relevance

[Dec 5, 2022](https://hashnode.com/posts/how-to-upload-multiple-images-with-django-rest-framework/638cc640aae902a0052c9902/comment/638dce0d4a96bb8fda43b223)

Wow, this is a good piece. But please I need you to help explain how i can solve this django ecommerce code base error message. I downloaded a django ecommerce code base, and I have not been able to execute the command runserver, it's a security key issue.

![Screenshot (297).png](https://cdn.hashnode.com/res/hashnode/image/upload/v1670237703166/7LmVbZ0-o.png)

[Odulaja Philip Temitayo](https://hashnode.com/@odulajaphilip)

Software Engineer | Python Instructor

[Dec 5, 2022](https://hashnode.com/posts/how-to-upload-multiple-images-with-django-rest-framework/638cc640aae902a0052c9902/comment/638dce0d4a96bb8fda43b223#reply-638dd4564a96bb8fda43b2d8)

Thanks for your nice comment, but this isn't enough for me to help you to debug but with what I can see right now.

Your secret key is in yiou .env file and you can use python dotenv module to get the value out of the env file and use it in your settings.py or you can simply write your secret key in your settings.py during development

Below is the link on how to use python dotenv module.

[pypi.org/project/python-dotenv](https://pypi.org/project/python-dotenv/)

I hope this helps you

[Olajide Igbalaye](https://hashnode.com/@Ryticle)

Eternal Relevance

[Dec 5, 2022](https://hashnode.com/posts/how-to-upload-multiple-images-with-django-rest-framework/638cc640aae902a0052c9902/comment/638dce0d4a96bb8fda43b223#reply-638df9db895a9daa034fbec1)

[Odulaja Philip Temitayo](https://hashnode.com/@odulajaphilip) Thank you for your quick response. I am doing a training with Zuri, Fullstack\_python. And I'm in a team whose project task is to create an e-commerce website using django. So i got a repo for similar workdone and I cloned it from the github repo. All I want to do is study it so as to be able to do my team's task. But the project key is hidden. So each time I want to make migrations or do "python manage.py runserver", it keeps giving me the "set the Secrete\_key environment variable" error message. And I can't find any .env file. The only env file in the project folder is empty. I am new to django. I will really need you to walk me through on this. As for the link you sent, I don't understand it either. please the work deadline is wednesday. Thank you

[Odulaja Philip Temitayo](https://hashnode.com/@odulajaphilip)

Software Engineer | Python Instructor

[Dec 6, 2022](https://hashnode.com/posts/how-to-upload-multiple-images-with-django-rest-framework/638cc640aae902a0052c9902/comment/638dce0d4a96bb8fda43b223#reply-638f43f0895a9daa034fdfd5)

There is nothing i can do in such a short time You can't see the .env file because it contains secret informations it has been ignored by git for security purposes

I told you to set the secret key manually so you can start the server up

something like this

SECRET\_KEY = "sdg65juhe987g64839wefmd5u4emdcjgb"

Do that it should at least work
