Langsung ke konten
Skillpedia
Testing101k · #1150

export-download-debugging

Fungsinya

Tool ini membantu mencari tahu mengapa file yang Anda coba unduh atau ekspor tidak berhasil. Tool ini memeriksa apakah file dibuat dengan benar sebelum mencoba menyimpannya, terutama untuk gambar.

Kapan dipakai

  • ✓Saat unduhan atau ekspor terlihat berhasil, tetapi file akhirnya kosong.
  • ✓Jika file gambar yang diunduh tidak bisa dibuka atau rusak.
  • ✓Saat mengalami masalah dengan fungsi 'Save As' di browser atau aplikasi.

Link skill

https://github.com/nexu-io/open-design/blob/main/skills/export-download-debugging/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/nexu-io/open-design/blob/main/skills/export-download-debugging/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit →

Contoh permintaan ke AI

“Gambar hasil ekspor saya berukuran 0 KB, bisakah Anda bantu memperbaikinya?”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Tool ini pertama-tama memeriksa apakah data file dibuat dengan benar. Jika sudah benar, tool mencoba metode penyimpanan yang lebih sederhana dan andal, untuk menghindari masalah umum yang menghasilkan file kosong.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

Export Download Debugging

Use this when an export or download appears to run but produces an empty, missing, or unusable file. It is tuned for browser previews, iframe capture, and Electron shells.

Core rule

Separate capture from save. Prove the export payload has non-zero bytes before debugging the destination path. A 0 KB file often means the native picker or host created the target file, then the write failed or was blocked.

Evidence

  • Record the payload type, MIME type, byte length, object URL or data URL path, and thrown error name/message.
  • Check browser console output and app logs around showSaveFilePicker, createWritable, <a download>, URL.createObjectURL, and URL revocation.
  • In Electron, inspect the will-download path: filename, MIME, file extension, save dialog filters, cancellation, and final file size.
  • Confirm the actual downloaded file size on disk and whether it opens in a normal image viewer.

Fix order

  1. Prepare and validate the export payload first; disable Save until bytes are available.
  2. Prefer the simplest stable save channel for the host. If showSaveFilePicker().createWritable() fails, is sandboxed, or creates empty files, route to <a download> or Electron's download manager instead.
  3. Avoid opening a native picker before the payload is ready. This prevents the host from creating an empty destination file on later write failure.
  4. For PNG fallback, prefer a verified non-empty data URL when blob URLs, revocation timing, CSP, or iframe sandboxing are suspicious.
  5. In Electron, add explicit Save As filters for exported image extensions (.png, .jpg, .jpeg, .webp) so users can choose a real image target.
  6. Keep the UI restrained: format selection, filename/path hint, clear pending and error states, and one primary save action.

Validation

  • Add or update tests for non-empty payload preparation, fallback save behavior, file extension/MIME mapping, and UI disabled/error states.
  • Run focused export tests, then pnpm --filter @open-design/web typecheck.
  • If Electron download handling changed, also run pnpm --filter @open-design/desktop typecheck.
  • Before landing, run pnpm guard, inspect the staged diff for unrelated files, generated artifacts, and accidental secrets, then use the repository's PR quality-gate workflow if the fix is being prepared for review.
Pertanyaan umum

Mengapa file akhirnya kosong?

Ini sering terjadi karena sistem membuat file di komputer Anda, tetapi proses penulisan data gagal atau terhenti sebelum selesai.

Apa itu 'payload'?

Payload adalah informasi atau data yang ingin Anda ekspor atau unduh, seperti piksel pada gambar atau isi dokumen.

Apa itu 'Blob/Data URLs'?

Ini adalah cara merepresentasikan data (seperti gambar) langsung di browser tanpa perlu file terpisah. Tool ini memeriksa apakah keduanya berfungsi dengan benar.

Detail

Deskripsi asli dari pembuat

Diagnose and fix browser, preview, or Electron export/download failures, especially image export issues involving Save As, Blob/Data URLs, the File System Access API, createWritable failures, and 0 KB files.

repo: nexu-io/open-design

Popularitas

Bintang GitHub
101k
Peringkat
#1150
Lisensi
Apache-2.0
Diperbarui
15/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa