Spaces:
Sleeping
Sleeping
Update templates/result.html
Browse files- templates/result.html +7 -12
templates/result.html
CHANGED
@@ -149,22 +149,17 @@
|
|
149 |
<div class="row">
|
150 |
<!-- PDF Viewer Column -->
|
151 |
<div class="col-md-6 file-container">
|
152 |
-
{% if parsed_data %}
|
153 |
{% if file_extension in ['pdf'] %}
|
154 |
-
|
155 |
-
|
156 |
{% elif file_extension in ['png', 'jpg', 'jpeg'] %}
|
157 |
-
|
158 |
-
|
159 |
{% elif file_extension in ['docx', 'rsf', 'odt'] %}
|
160 |
-
|
161 |
-
|
162 |
-
File</a>
|
163 |
-
{% else %}
|
164 |
-
<p>Can't Display This File Type.</p>
|
165 |
-
{% endif %}
|
166 |
{% else %}
|
167 |
-
|
168 |
{% endif %}
|
169 |
</div>
|
170 |
|
|
|
149 |
<div class="row">
|
150 |
<!-- PDF Viewer Column -->
|
151 |
<div class="col-md-6 file-container">
|
|
|
152 |
{% if file_extension in ['pdf'] %}
|
153 |
+
<!-- Display PDF in an iframe -->
|
154 |
+
<iframe src="{{ file_url }}" title="PDF Viewer" class="file-viewer"></iframe>
|
155 |
{% elif file_extension in ['png', 'jpg', 'jpeg'] %}
|
156 |
+
<!-- Display Image -->
|
157 |
+
<img src="{{ file_url }}" alt="Processed Image" class="img-fluid file-viewer" />
|
158 |
{% elif file_extension in ['docx', 'rsf', 'odt'] %}
|
159 |
+
<!-- Provide Download Link for Non-Viewable Files -->
|
160 |
+
<a href="{{ file_url }}" class="btn btn-primary" download>Download {{ file_extension | upper }} File</a>
|
|
|
|
|
|
|
|
|
161 |
{% else %}
|
162 |
+
<p>Can't Display This File Type.</p>
|
163 |
{% endif %}
|
164 |
</div>
|
165 |
|