New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

pronto-documents-service

Package Overview
Dependencies
Maintainers
3
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pronto-documents-service

Interface for uploading files from a url or a local file path.

  • 0.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8
decreased by-20%
Maintainers
3
Weekly downloads
 
Created
Source

Documents Service

Interface for uploading files from a url or a local file path.

Configuration

Configure the service with a provider and the configuration for that provider's node api. For now just use s3.

provider: 's3'
s3: {
    accessKeyId: ''
    secretAccessKey: ''
    region: ''
}

If you wanted, you could spin up two separate documents services (with different slugs) that host images on separate providers... and use them to host bulk public & secure images from your platform in different places according to any requirements. You can also just do this with different s3 buckets from different apps.

Methods

uploadFileFromURL = (bucket, url, dest_filename, cb) ->

Upload to a bucket from a url. The file will be saved at s3:[bucket]/dest/filename/here.png

uploadFileFromPath = (bucket, path, dest_filename, cb) ->

Upload to a bucket from a local path on your server. The file will be saved at s3:[bucket]/dest/filename/here.png

deleteDocument = (bucket, full_filename, cb) ->

Remove a file from a bucket with an s3 path from that bucket.

FAQs

Package last updated on 13 Aug 2019

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