Marthee commited on
Commit
265a3b9
·
verified ·
1 Parent(s): 671f05e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -12
app.py CHANGED
@@ -22,20 +22,11 @@ def process():
22
  print('In process [Try]')
23
  data = request.form
24
  print('here',data)
25
- key1 = data.get('filePath')
26
- print('kk',key1)
27
- data = request.get_json() # Correct method to get JSON data
28
- print(data)
29
- print('0')
30
- # Ensure 'pdfpath' is included in the request
31
- if 'filePath' not in data:
32
- return jsonify({"error": "Missing 'pdfpath' in request data"}), 400
33
- print('1')
34
- pdfpath = data['filePath']
35
- print('2')
36
  dbxTeam = tsadropboxretrieval.ADR_Access_DropboxTeam('user')
37
  print('3')
38
- md, res = dbxTeam.files_download(path=pdfpath)
39
  pdf_data = res.content
40
  print('4')
41
 
 
22
  print('In process [Try]')
23
  data = request.form
24
  print('here',data)
25
+ filePath = data.get('filePath')
26
+
 
 
 
 
 
 
 
 
 
27
  dbxTeam = tsadropboxretrieval.ADR_Access_DropboxTeam('user')
28
  print('3')
29
+ md, res = dbxTeam.files_download(path=filePath)
30
  pdf_data = res.content
31
  print('4')
32