Skip to content

Commit

Permalink
For #73 🐛 in post top_img filepath
Browse files Browse the repository at this point in the history
  • Loading branch information
lissa3 committed Oct 28, 2023
1 parent 9e9d0cd commit 6286689
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/utils/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def upload_img(instance, filepath):
if klass == "profile":
user_folder = f"profile_{instance.user.id}"
return os.path.join("avatar", user_folder, new_file_name)
elif klass == "image":
elif klass == "post":
folder = f"post_{date_trace}"
return os.path.join("post", folder, new_file_name)
elif klass == "category":
Expand Down

0 comments on commit 6286689

Please sign in to comment.