shares
A remoteStorage data module for sharing of files.
All shares are stored with a timestamp prefix. For images, thumbnails are created and stored in a subdirectory.
- shares
- storeFile(mimeType, name, data) ⇒
Promise
⏏ - remove(name) ⇒
Promise
⏏ - list() ⇒
Promise
⏏ - getFileURL(name) ⇒
string
⏏
- storeFile(mimeType, name, data) ⇒
Promise
⏏
storeFile(mimeType, name, data) ⇒ Stores a shared file
Kind: Exported function
Returns: Promise
- A promise, which will be fulfilled with the absolute
URL of the newly uploaded file (see )
Access: public
Param | Type | Description |
---|---|---|
mimeType | string |
Content type of the file |
name | string |
Filename |
data | ArrayBuffer |
File contents |
Example
remoteStorageshares
Promise
⏏
remove(name) ⇒ Remove a file
Kind: Exported function
Access: public
Param | Type | Description |
---|---|---|
name | string |
The filename |
Promise
⏏
list() ⇒ List all shared files
Kind: Exported function
Returns: Promise
- Resolves with an array containing the filenames
Access: public
string
⏏
getFileURL(name) ⇒ Get the absolute URL of a file.
Kind: Exported function
Returns: string
- The absolute URL of the file
Access: public
Param | Type | Description |
---|---|---|
name | string |
the filename |