Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,20 +22,11 @@ def process():
|
|
| 22 |
print('In process [Try]')
|
| 23 |
data = request.form
|
| 24 |
print('here',data)
|
| 25 |
-
|
| 26 |
-
|
| 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=
|
| 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 |
|