Skip to content

Commit

Permalink
updated encode_view
Browse files Browse the repository at this point in the history
  • Loading branch information
nyashaChiza committed Aug 17, 2024
1 parent c6187d8 commit f27cdc1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions stegnography/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def encode_view(request):

# Save file to media folder
file_path = os.path.join(settings.MEDIA_ROOT, file_name)
os.makedirs(os.path.dirname(file_path), exist_ok=True)
with open(file_path, 'wb') as f:
f.write(stego_image_file.read())

Expand Down

0 comments on commit f27cdc1

Please sign in to comment.