Repository navigation
v1.0.0 - Initial release
ChatGPT Download Helper
A lightweight browser extension that captures ChatGPT-generated file download_url values from network responses so you can open the real file URL when normal downloads fail.
✨ Why this exists
Sometimes ChatGPT file downloads fail in the browser even though the file was generated successfully.
This extension helps by watching the page’s network activity, detecting the JSON response that contains download_url, and surfacing that URL in the extension popup so you can copy or open the real file link.
🚀 Features
- Captures ChatGPT file
download_urlvalues - Works on
chatgpt.com - Popup UI to:
- View the latest captured URL
- Copy the URL
- Open the URL in a new tab
- Refresh the latest captured value
- Uses page-script injection so it can observe the page’s real
fetchandXMLHttpRequesttraffic - Useful when normal ChatGPT file downloads fail or stall
🧠 How it works
ChatGPT file downloads often happen in two steps:
-
The page makes a request to an internal endpoint such as:
/backend-api/conversation/.../interpreter/download -
That endpoint returns JSON containing a field like:
download_url -
The actual file is downloaded from that returned URL
This extension captures that download_url and stores the latest one so you can access it from the popup.
📁 Project structure
chatgpt_download_helper/
├── manifest.json
├── content.js
├── injected.js
├── popup.html
├── popup.js
└── README.md
File overview
-
manifest.json
Defines the extension, permissions, popup, content script, and browser compatibility settings. -
content.js
Runs on the ChatGPT page. Injects the page-level script and listens for captured URLs sent back from the page. -
injected.js
Runs in the actual page context. Hooks intofetchandXMLHttpRequest, scans responses, and detectsdownload_url. -
popup.html
The popup interface shown when you click the extension icon. -
popup.js
Loads the saved URL into the popup and handles Copy / Open / Refresh actions.
🛠 Installation
Firefox
Temporary install in Firefox
This is the easiest method for local testing.
- Download or extract the extension folder
- Open Firefox
- Go to
about:debugging#/runtime/this-firefox - Click Load Temporary Add-on
- Select the
manifest.jsonfile inside the extension folder
Install from XPI
If you packaged the extension as an .xpi file:
- Open Firefox
- Go to
about:addons - Click the gear icon
- Choose Install Add-on From File...
- Select the
.xpifile
Chrome
Load unpacked in Chrome
- Download or extract the Chrome extension folder
- Open Chrome
- Go to
chrome://extensions - Turn on Developer mode in the top-right corner
- Click Load unpacked
- Select the extracted extension folder
- The extension should now appear in your extensions list
- Pin it to the toolbar if you want quicker access
Update the extension after changes
- Open
chrome://extensions - Make sure Developer mode is still enabled
- Click the Reload button on the extension card
▶️ Usage
- Open
https://chatgpt.com - Generate or locate a downloadable file in ChatGPT
- Click the normal download link
- Click the extension icon
- The popup should display the most recent captured
download_url - Choose one of the following:
- Copy URL to copy it to your clipboard
- Open URL to open the real file link in a new tab
- Refresh to reload the latest saved value in the popup
🔐 Permissions
storage
Used to save the latest captured download_url so the popup can read it.
tabs
Used so the popup can open the captured URL in a new browser tab.
Host permission: https://chatgpt.com/*
Required so the extension can run on ChatGPT pages and observe download-related network responses there.
⚙️ Technical details
Why content.js alone is not enough
Browser extensions run content scripts in an isolated world.
That means overriding window.fetch or XMLHttpRequest directly inside a content script often does not affect the page’s real JavaScript environment.
To solve that, this extension:
- Injects
injected.jsinto the page - Hooks the page’s real
fetchandXMLHttpRequest - Detects JSON containing
download_url - Sends the detected URL back using
window.postMessage - Saves it with extension storage
Response detection strategy
The script tries two approaches:
-
Parse the response as JSON and check for:
download_url
-
If JSON parsing fails, use a regex fallback to search raw text for:
"download_url": "..."
This makes detection more resilient if the response formatting changes slightly.
⚠️ Limitations
- The captured URL may expire quickly
- If ChatGPT changes its internal response format, the extension may need updates
- The extension only stores the most recent captured URL
- It depends on ChatGPT returning a response that contains
download_url
🧯 Troubleshooting
Popup says “No download URL captured yet”
Possible causes:
- You did not click a ChatGPT file download yet
- The request did not return a
download_url - The page was already open before installing the extension and needs a refresh
- ChatGPT changed its internal download flow
Try:
- Refresh the ChatGPT page
- Click the file download again
- Reopen the popup
- Check the browser console for logs
The captured link does not work
Possible causes:
- The
download_urlexpired - The file backing the download expired on the server side
- You waited too long before opening it
Try again with a newly generated file.
The extension loads but still captures nothing
Try:
- Remove the old extension version
- Reinstall the new version
- Refresh ChatGPT completely
- Retry the download immediately
🔒 Security notes
- Do not share session tokens, cookies, or authorization headers
- This extension is intended for your own local browser use
- It only captures download URLs on ChatGPT pages
- Review the source code before installing if you plan to distribute it
🧪 Development
Edit the extension
Modify:
injected.jsfor network capture logiccontent.jsfor storage and page-to-extension messagingpopup.htmlandpopup.jsfor popup UI behavior
Reload after changes
Firefox
- Go back to
about:debugging#/runtime/this-firefox - Click Reload on the extension
Chrome
- Open
chrome://extensions - Click Reload on the extension card
🗺 Roadmap
- Add on-page “Copy latest download URL” button
- Add history of recently captured URLs
- Add better filtering so only ChatGPT file-download responses are captured
- Add export/debug mode for troubleshooting
📌 Disclaimer
This project is an unofficial utility for personal troubleshooting and is not affiliated with or endorsed by OpenAI.
📜 License
MIT
ChatGPT-Download-Fixer-Chrome-Source-v1.0.0.zip
ChatGPT-Download-Fixer-Firefox-Source-v1.0.0.zip
ChatGPT-Download-Fixer-Firefox-v1.0.0-XPI.zip