Skip to content

Commit

Permalink
views: Place comics into the correct folder on upload.
Browse files Browse the repository at this point in the history
  • Loading branch information
MostAwesomeDude committed Jul 2, 2011
1 parent e1bac56 commit 6821d93
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion newrem/views.py
Expand Up @@ -131,7 +131,8 @@ def upload():
% (bottom, top))
return render_template("upload.html", form=form)

filename = secure_filename(form.file.file.filename)
filename = os.path.join("comics",
secure_filename(form.file.file.filename))
path = os.path.abspath(os.path.join("uploads", filename))
if os.path.exists(path):
flash("File already exists!")
Expand Down

0 comments on commit 6821d93

Please sign in to comment.