Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

remotestorage-module-shares

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remotestorage-module-shares

remoteStorage.js module for sharing images and other files

  • 2.1.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
2
Weekly downloads
 
Created
Source

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.

  • shares
    • storeFile(mimeType, name, data)Promise
    • remove(name)Promise
    • list()Promise
    • getFileURL(name)string

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

Keywords

FAQs

Package last updated on 26 Jan 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc