Update app.py
Browse files
app.py
CHANGED
@@ -201,7 +201,7 @@ def save_image(image, filename):
|
|
201 |
max_filename_length = 250
|
202 |
filename_stem, extension = os.path.splitext(filename)
|
203 |
truncated_stem = filename_stem[:max_filename_length - len(extension)] if len(filename) > max_filename_length else filename_stem
|
204 |
-
filename = f"{
|
205 |
filename = sanitize_filename(filename)
|
206 |
try:
|
207 |
with open(filename, "wb") as f:
|
|
|
201 |
max_filename_length = 250
|
202 |
filename_stem, extension = os.path.splitext(filename)
|
203 |
truncated_stem = filename_stem[:max_filename_length - len(extension)] if len(filename) > max_filename_length else filename_stem
|
204 |
+
filename = f"{truncated_stem}{extension}"
|
205 |
filename = sanitize_filename(filename)
|
206 |
try:
|
207 |
with open(filename, "wb") as f:
|