From 154282e19a90e2952c6376f0c3e848ccfe5d23aa Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 31 Dec 2018 11:22:26 +0100 Subject: [PATCH] fix gpx upload - #28 the temp directory path may differ depending on OS --- fittrackee_api/fittrackee_api/activities/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fittrackee_api/fittrackee_api/activities/utils.py b/fittrackee_api/fittrackee_api/activities/utils.py index 09b4bcc9..729f9e65 100644 --- a/fittrackee_api/fittrackee_api/activities/utils.py +++ b/fittrackee_api/fittrackee_api/activities/utils.py @@ -295,7 +295,7 @@ def get_new_file_path( if not os.path.exists(dir_path): os.makedirs(dir_path) file_path = os.path.join(dir_path, - new_filename.replace('/tmp/', '')) + new_filename.split('/')[-1]) return file_path