Skip to content

Instantly share code, notes, and snippets.

@scripting
Created October 21, 2020 15:12
Show Gist options
  • Save scripting/aeb83fdb6c911150ac52e185dd9b5be5 to your computer and use it in GitHub Desktop.
Save scripting/aeb83fdb6c911150ac52e185dd9b5be5 to your computer and use it in GitHub Desktop.
const folder = "/root/Dropbox/Miami/littleoutliner/publicFiles/users/";
var url = options.httpRequest.url;
var splits = url.split ("?");
url = splits [0];
splits = url.split ("/");
var username = splits [1], fname = splits [2];
if ((username === undefined) || (fname === undefined)) { //tell pagePark we're not handling it
callback (undefined, {flNotHandled: true});
}
else {
var f = folder + username + "/myOutlines/" + fname;
console.log (f);
options.serveLocalFile (f);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment