2.1.4 • Published 6 years ago

remotestorage-module-shares v2.1.4

Weekly downloads
5
License
MIT
Repository
github
Last release
6 years ago

npm

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.

storeFile(mimeType, name, data) ⇒ Promise

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

ParamTypeDescription
mimeTypestringContent type of the file
namestringFilename
dataArrayBufferFile contents

Example

remoteStorage.shares.storeFile(mimeType, filename, content)
  .then((url) => { console.log(`successfully stored file at ${url}`)

remove(name) ⇒ Promise

Remove a file

Kind: Exported function
Access: public

ParamTypeDescription
namestringThe filename

list() ⇒ Promise

List all shared files

Kind: Exported function
Returns: Promise - Resolves with an array containing the filenames
Access: public

getFileURL(name) ⇒ string

Get the absolute URL of a file.

Kind: Exported function
Returns: string - The absolute URL of the file
Access: public

ParamTypeDescription
namestringthe filename
2.1.4

6 years ago

2.1.3

6 years ago

2.1.2

7 years ago

2.1.1

7 years ago

2.1.0

7 years ago

2.0.0

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago