윤영준 윤영준 2023-10-31
more error messages
@516517071d13189afc2e2974df75ef95f7398e91
action.py
--- action.py
+++ action.py
@@ -55,10 +55,15 @@
     @Action.doc(responses={200: 'Success'})
     @Action.doc(responses={500: 'Register Failed'})
     def post(self):
-        # Extracting JSON data
+
+        uploaded_file = request.files.get('file')
+        if not uploaded_file:
+            return {"message": "No file uploaded"}, 400
+
         json_data = request.form.get('data')
         if not json_data:
-            return jsonify({"message": "Missing JSON data"}), 400
+            return {"message": "Missing JSON data"}, 400
+
         data = json.loads(json_data)
 
         lat = float(data['gps_x'])
Add a comment
List