For those looking to export all files from the Bubble File Manager:
Since Bubble doesn’t provide a built-in way to export everything, I needed a solution and this worked perfectly for me.
You just need to:
- Go to Data → File Manager
- Open your browser console (DevTools → Console)
- Paste the script below
It will automatically fetch all files and download a full CSV export.
It loops through all batches (50 by 50), shows live progress in the console, and generates a CSV with all file metadata + a usable CDN URL.
Here’s the script:
async function exportAllBubbleFiles() {
let allFiles = [];
let cursor = 0;
const limit = 50;
let hasMore = true;
const CDN_BASE = "https://YOUR_CDN_ID.cdn.bubble.io"; // replace with your CDN domain
while (hasMore) {
const res = await fetch("https://bubble.io/appeditor/list_uploaded_files", {
method: "POST",
credentials: "include",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
appname: "your-app-name", // replace with your app name
app_version: "live",
cursor: cursor,
limit: limit,
filename: "",
only_private_file: false,
file_type: "all",
sort_type: "date",
descending: true
})
});
const data = await res.json();
const results = data.response?.results || [];
if (results.length === 0) {
hasMore = false;
break;
}
allFiles.push(...results);
cursor += limit;
console.log(`Loaded ${allFiles.length} files`);
}
const allKeys = new Set();
allFiles.forEach(file => {
Object.keys(file).forEach(key => allKeys.add(key));
});
const columns = Array.from(allKeys);
columns.push("full_cdn_url");
const csv = [
columns,
...allFiles.map(file =>
columns.map(col => {
if (col === "full_cdn_url") {
return `"${CDN_BASE}/${file.s3_key_text || ""}"`;
}
const value = file[col] ?? "";
return `"${String(value).replace(/"/g, '""')}"`;
})
)
]
.map(row => row.join(","))
.join("\n");
const blob = new Blob([csv], { type: "text/csv;charset=utf-8;" });
const link = document.createElement("a");
link.href = URL.createObjectURL(blob);
link.download = "bubble_file_manager_export.csv";
link.click();
}
exportAllBubbleFiles();
That’s it.
Hope it helps someone.