Commit
·
08a80a5
1
Parent(s):
b41883d
Update app.py
Browse files
app.py
CHANGED
@@ -130,11 +130,11 @@ def write_file(file_path, content):
|
|
130 |
try:
|
131 |
with open(file_path, "w") as file:
|
132 |
file.write(content)
|
133 |
-
with open(file_path, "rb") as file:
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
return f"Successfully written to {file_path}."
|
138 |
except:
|
139 |
return "Error occurred while writing to file."
|
140 |
|
|
|
130 |
try:
|
131 |
with open(file_path, "w") as file:
|
132 |
file.write(content)
|
133 |
+
#with open(file_path, "rb") as file:
|
134 |
+
# contents = file.read()
|
135 |
+
# b64 = base64.b64encode(contents).decode()
|
136 |
+
# href = f'<a href="data:application/octet-stream;base64,{b64}" download="{file_path}">Download</a>'
|
137 |
+
return f"Successfully written to {file_path}."
|
138 |
except:
|
139 |
return "Error occurred while writing to file."
|
140 |
|