Skip to content
This repository has been archived by the owner on Nov 29, 2021. It is now read-only.

Problem uploading images #5

Closed
umanghce opened this issue Dec 5, 2018 · 2 comments
Closed

Problem uploading images #5

umanghce opened this issue Dec 5, 2018 · 2 comments

Comments

@umanghce
Copy link

umanghce commented Dec 5, 2018

While uploading images, I am getting the following error:
file = request.FILES.values()[0]
TypeError: 'generator' object is not subscriptable

@huseyinduz
Copy link

Is it late :)

file = list(request.FILES.values())#[0]
filex=file[0]
upload = Upload(name=filex.name, image=filex)

@tubaman
Copy link
Owner

tubaman commented Mar 25, 2021

This is probably because I developed this on Django 1.10 and since then Django has changed requests.FILES.values from a list to a generator. The real answer to this is that I need to update the app to work with more recent version of Django

@tubaman tubaman closed this as completed Mar 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants