diff --git a/ecs/jskult-webapp/src/controller/master_mainte.py b/ecs/jskult-webapp/src/controller/master_mainte.py index 407f3785..4e7b8a16 100644 --- a/ecs/jskult-webapp/src/controller/master_mainte.py +++ b/ecs/jskult-webapp/src/controller/master_mainte.py @@ -137,10 +137,9 @@ async def inst_emp_csv_upload( # 画面表示用のモデル error_message_list = [] - content_type: str = csv_upload_form.csv_file.content_type.strip() if csv_upload_form.csv_file.size == 0: error_message_list.append('選択されたファイルが見つかりませんでした。') - elif content_type != 'text/csv' and content_type != 'application/vnd.ms-excel' and content_type != 'application/octet-stream': + elif not csv_upload_form.csv_file.filename.endswith('.csv'): error_message_list.append('選択されたファイル形式が"csv"ではありません。') elif csv_upload_form.csv_file.size >= constants.MENTE_CSV_UPLOAD_MAX_FILE_SIZE_BYTE: error_message_list.append('選択されたCSVファイルサイズが大きいです。100MB未満にしてください。')