Closed
Description
Just to say that I found a bug in a early version of this library, when you try to upload a picture that includes the symbol '#' in the file name. For example:
Photo on 2012-04-05 at 15.56 #3.jpg
These kind of file names are typical when using MacBook webcams.
So, I solved that using slugify() with the file name, in order to avoid strange characters. Something like:
# avatar/views.py
def add(...):
# ...
file_name = os.path.splitext(image_file.name)
name = file_name[0]
extension = file_name[1]
new_file_name = slugify(name) + extension
avatar.avatar.save(new_file_name, image_file)
# ...
Metadata
Assignees
Labels
No labels
Activity