Skip to content

UnboundLocalError: local variable ‘name’ referenced before assignment #43

@flavianmissi

Description

@flavianmissi

I'm getting this error in my application every time I try to upload a file (0.2.2):

File "/django_filepicker/utils.py", line 62, in get_file
  file = File(tmp, name=name)
UnboundLocalError: local variable ‘name’ referenced before assignment

I suppose I am getting this because neither the X-File-Name nor Content-Disposition headers are being set by the application.
The thing is I'm not sure why, can you shed me a light?

Also, maybe that's something you wanna protect from, like having a default for the name variable maybe?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions