Maintainer: | Sebastian Kippe seba@kip .pe stian |
Version: | 0.3.0 |
Manages sharing of files. All shares are stored with a timestamp prefix. For images, thumbnails are created and stored in a subdirectory.
Shares | |
Functions | |
storeFile | Stores a shared file |
remove | Remove a file |
listFiles | List all shared files |
getFileURL | Get the absolute URL of a file. |
_formattedDate | Helper method for formatting dates for filenames |
storeFile: function( mimeType, name, data )
Stores a shared file
mimeType | the picture MIME type. |
name | the picture name. |
data | the picture (expected as an `ArrayBuffer`). |
A promise, which will be fulfilled with the absolute URL of the newly uploaded file (see getFileURL).
Stores a shared file
storeFile: function( mimeType, name, data )
Remove a file
remove: function( name )
Get the absolute URL of a file.
getFileURL: function( name )
Helper method for formatting dates for filenames
_formattedDate: function ( date )