|
|
@ -216,6 +216,7 @@ def feedback(args=None, request=None): |
|
|
|
for x in f: |
|
|
|
file_name = x |
|
|
|
file_data = f[x] |
|
|
|
|
|
|
|
file_url = "/home/ubuntu/frappe-bench/sites/" + site_name + "/public/files/" + file_name |
|
|
|
with open(file_url, "wb") as img: |
|
|
|
img.write(base64.b64decode(file_data)) |
|
|
@ -232,7 +233,7 @@ def feedback(args=None, request=None): |
|
|
|
file_response.append(ret) |
|
|
|
api = {"isSuccessful": True, "name": usr_fdbk.name, "files": file_response} |
|
|
|
except Exception as e: |
|
|
|
api = {"status": 0, "error": "Failed to create Feedback"} |
|
|
|
api = {"status": 0, "error": str(frappe.get_traceback())} |
|
|
|
else: |
|
|
|
api = {"status": 0, "error": "Check argument: args"} |
|
|
|
else: |
|
|
|