Skip to content

Commit

Permalink
Add back file seek 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh authored and goapunk committed Jan 20, 2025
1 parent b1b29b3 commit ef60b63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion meinberlin/apps/bplan/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ def create(self, validated_data):

tile_image = validated_data.pop("tile_image", None)
if tile_image:
print(tile_image)
validated_data["tile_image"] = self._create_image_from_base64(tile_image)

image_url = validated_data.pop("image_url", None)
Expand Down Expand Up @@ -329,6 +328,7 @@ def _generate_image_filename(self, url_path, file):

root_path, extension = posixpath.splitext(url_path)
if file:
file.seek(0)
file_mime = magic.from_buffer(file.read(), mime=True)
extension = mimetypes.guess_extension(file_mime) or "jpeg"

Expand Down

0 comments on commit ef60b63

Please sign in to comment.