Skip to content

Instantly share code, notes, and snippets.

@lsm
Created December 11, 2014 00:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lsm/fb6121879c0c91e40d48 to your computer and use it in GitHub Desktop.
Save lsm/fb6121879c0c91e40d48 to your computer and use it in GitHub Desktop.
An example of using firebase as filesystem
// Example folder object
{
example_folder: {
type: "folder",
children: {
file1: {
type: "file",
blob: <Buffer 74 68 69 73 20 69 73 20 61 6e 20 65 78 61 6d 70 6c 65 20 66 69 6c 65> // this is a 10MB file
},
subfolder: {
type: "folder",
children: {
subfolder_file1: {
type: "file",
blob: <Buffer 74 68 69 73 20 69 73 20 61 6e 20 65 78 61 6d 70 6c 65 20 66 69 6c 65> // another 10MB file
}
}
},
file2: {
type: "file",
blob: <Buffer 74 68 69 73 20 69 73 20 61 6e 20 65 78 61 6d 70 6c 65 20 66 69 6c 65> // agian, a 10MB file
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment