From 06c50cedfe516a46f3b5685aa625f251398c7d06 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Mon, 10 May 2021 21:16:07 +0200 Subject: [PATCH] recognizing images / json --- rowers/dataprep.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/rowers/dataprep.py b/rowers/dataprep.py index 66e63a01..afe94e76 100644 --- a/rowers/dataprep.py +++ b/rowers/dataprep.py @@ -2013,6 +2013,16 @@ def new_workout_from_file(r, f2, return -1, message, f2 # Some people try to upload Concept2 logbook summaries + if fileformat == 'imageformat': + os.remove(f2) + message = "You cannot upload image files here" + return (0, message, f2) + + if fileformat == 'json': + os.remove(f2) + message = "JSON format not supported in direct upload" + return (0, message, f2) + if fileformat == 'c2log': os.remove(f2) message = "This summary does not contain stroke data. Use the files containing stroke by stroke data."