Roam Research ✍️ Files Attachment Dashboard 🗃
Upload files to custom servers rather than default Firebase storage, and manage your files in one place
the story begins from @RoamBounties
- Add a
{{[[roam/js]]}}
tag - Add a child JavaScript code block to it with this code...
// 1. New token from https://github.com/settings/tokens/new?scopes=repo
// 2. Create your GitHub repo and choose savePath to upload images 👇👇👇👇👇👇
// e.g. https://raw.githubusercontent.com/JimmyLv/images/master/2021/1618990038204.png
// 3. optional? DROPBOX_APP_KEY https://www.dropbox.com/developers/saver
window.roamFiles = {
DROPBOX_APP_KEY: 'PLEASE UPDATE TO YOURS!!!',
GITHUB_ACCESS_TOKEN: 'PLEASE UPDATE TO YOURS!!!',
repo: 'JimmyLv/images',
branch: 'main',
savePath: '2021',
embedType: 'preview', // or 'edit'
}
window.URLScriptServer = "https://styled-roam.vercel.app/";
var existing = document.getElementById("roam-files");
if (!existing) {
var extension = document.createElement("script");
extension.src = window.URLScriptServer + "file.js";
extension.id = "roam-files";
extension.async = true;
extension.type = "text/javascript";
document.getElementsByTagName("head")[0].appendChild(extension);
}
- Update the
window.roamFiles
config and Press the BIG RED button
- Generate new token from https://github.com/settings/tokens/new?scopes=repo
- Create your GitHub repo (e.g. JimmyLv/images) here: https://repo.new
- Update the
window.roamFiles
config in{{roam/js}}
- Just Copy and Paste (Ctrl-C/Ctrl-V) to save image into Roam Research as normal
https://twitter.com/Jimmy_JingLv/status/1384795856939847684?s=20
Create a new @Dropbox app and get the APP_KEY here: https://www.dropbox.com/developers/saver
(don't forget to add http://roamresearch.com into the Saver domains, and File Permission Scopes)