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

activestorage-storj

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

activestorage-storj

  • 1.0.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

ActiveStorage-Storj

ActiveStorage-Storj is a ruby gem that provides Storj cloud storage support for ActiveStorage in Rails.

Note: direct upload is not supported in this gem. To enable direct upload support, install activestorage-storj-s3 gem.

Requirements

  • Rails v7+

  • Install Active Storage on a Rails project.

    $ bin/rails active_storage:install
    $ bin/rails db:migrate
    
  • Build and install uplink-c library. Follow the guide at Prerequisites section.

Installation

  • Add this line to your Rails application's Gemfile:

    gem 'activestorage-storj', '~> 1.0'
    

    And then execute:

    $ bundle install
    
  • Declare a Storj Cloud Storage service in config/storage.yml:

    storj:
      service: storj
      access_grant: ""
      bucket: ""
      auth_service_address: auth.storjshare.io:7777
      link_sharing_address: https://link.storjshare.io
    

    Optionally provide upload and download options:

    storj:
      service: storj
      ...
      upload_chunk_size: 0
      download_chunk_size: 0
    

    Add public: true to prevent the generated URL from expiring. By default, the private generated URL will expire in 5 minutes.

    storj:
      service: storj
      ...
      public: true
    

Running the Tests

  • Create configurations.yml file in test/dummy/config/environments/service folder, or copy the existing configurations.example.yml as configurations.yml.

  • Provide Storj configurations for both storj and storj_public services in configurations.yml:

    storj:
      service: storj
      access_grant: ""
      bucket: ""
      auth_service_address: auth.storjshare.io:7777
      link_sharing_address: https://link.storjshare.io
    
    storj_public:
      service: storj
      access_grant: ""
      bucket: ""
      auth_service_address: auth.storjshare.io:7777
      link_sharing_address: https://link.storjshare.io
      public: true
    
  • Run the tests:

    $ bin/test
    

FAQs

Package last updated on 30 Jun 2023

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