Skip to content

Commit b0615af

Browse files
committed
Updated pathmanipulation.py
1 parent 554768a commit b0615af

File tree

1 file changed

+1
-1
lines changed
  • Path Manipulation/Path Manipulation while File Upload/python/pythonapp/pathmanipulation/src

1 file changed

+1
-1
lines changed

Path Manipulation/Path Manipulation while File Upload/python/pythonapp/pathmanipulation/src/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def upload_file():
5656
if file and is_valid_name(file.filename) and is_valid_extension(file.filename):
5757
filename = valid_filename(file.filename)
5858
if filename:
59-
unique_filename = get_unique_filename(app.config["UPLOAD_DIRECTORY"], file.filename)
59+
unique_filename = get_unique_filename(app.config["UPLOAD_DIRECTORY"], valid_filename(file.filename))
6060
file_path = os.path.join(app.config["UPLOAD_DIRECTORY"], unique_filename)
6161
file.save(file_path)
6262
logger.info(f"File '{unique_filename}' uploaded successfully at {file_path}")

0 commit comments

Comments
 (0)