Push Bot commited on
Commit
43a76a1
·
1 Parent(s): e95db4e

Preview: auto-choose base64 embed for small PDFs and file iframe for large; apply to pipeline + all debug previews

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -733,7 +733,7 @@ def debug_compile_output_zip():
733
 
734
  try:
735
  # Use served file path to avoid data: URI issues
736
- html = _pdf_to_iframe_file(pdf_path, height="700px")
737
  _write_logs(LOG_PATH, logs)
738
  return html
739
  except Exception as e:
@@ -847,7 +847,7 @@ def debug_compile_last_pipeline_zip():
847
  + "</pre>"
848
  )
849
  try:
850
- html = _pdf_to_iframe_file(pdf_path, height="700px")
851
  _write_logs(LOG_PATH, logs)
852
  return html
853
  except Exception as e:
@@ -950,7 +950,7 @@ def debug_compile_uploaded_zip(zip_file):
950
  + "</pre>"
951
  )
952
  try:
953
- html = _pdf_to_iframe_file(pdf_path, height="700px")
954
  _write_logs(LOG_PATH, logs)
955
  return html
956
  except Exception as e:
 
733
 
734
  try:
735
  # Use served file path to avoid data: URI issues
736
+ html = _pdf_preview_html(pdf_path, height="700px")
737
  _write_logs(LOG_PATH, logs)
738
  return html
739
  except Exception as e:
 
847
  + "</pre>"
848
  )
849
  try:
850
+ html = _pdf_preview_html(pdf_path, height="700px")
851
  _write_logs(LOG_PATH, logs)
852
  return html
853
  except Exception as e:
 
950
  + "</pre>"
951
  )
952
  try:
953
+ html = _pdf_preview_html(pdf_path, height="700px")
954
  _write_logs(LOG_PATH, logs)
955
  return html
956
  except Exception as e: