Skip to content

Commit

Permalink
Use leaflet ID in image paths
Browse files Browse the repository at this point in the history
This is a partial fix for #235, as it will prevent new uploads from
showing the wrong image. It doesn't fix old images / uploads.

Refs #235
  • Loading branch information
symroe committed Jan 30, 2024
1 parent 94029ca commit 15d1024
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion electionleaflets/apps/leaflets/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def done(self, form_list, **kwargs):
"Bucket": bucket.name,
"Key": file_path,
}
new_file_name = f"leaflets/{file_name}"
new_file_name = f"leaflets/{leaflet.pk}/{file_name}"
moved_file = bucket.Object(new_file_name)
moved_file.copy(copy_source)

Expand Down

0 comments on commit 15d1024

Please sign in to comment.