Skip to content

Instantly share code, notes, and snippets.

@lsm
Created Dec 11, 2014
Embed
What would you like to do?
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