All Projects → robin850 → carrierwave-dropbox

robin850 / carrierwave-dropbox

Licence: MIT license
Carrierwave storage for Dropbox

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to carrierwave-dropbox

Cakephp File Storage
Abstract file storage and upload plugin for CakePHP. Write to local disk, FTP, S3, Dropbox and more through a single interface. It's not just yet another uploader but a complete storage solution.
Stars: ✭ 202 (+201.49%)
Mutual labels:  dropbox, storage
Go Storage
An application-oriented unified storage layer for Golang.
Stars: ✭ 87 (+29.85%)
Mutual labels:  dropbox, storage
Drive
☁️ A distributed cloud based lazy drive to files integrated with Dropbox, Google Drive.
Stars: ✭ 36 (-46.27%)
Mutual labels:  dropbox, storage
go-storage
A vendor-neutral storage library for Golang: Write once, run on every storage service.
Stars: ✭ 387 (+477.61%)
Mutual labels:  dropbox, storage
hassio-dropbox-sync
Back up your Hass.io snapshots and other local files to Dropbox
Stars: ✭ 99 (+47.76%)
Mutual labels:  dropbox
sqlweb
SqlWeb is an extension of JsStore which allows to use sql query for performing database operation in IndexedDB.
Stars: ✭ 38 (-43.28%)
Mutual labels:  storage
PandaNote
iOS markdown Note App / iOS的markdown笔记应用
Stars: ✭ 32 (-52.24%)
Mutual labels:  dropbox
SimpleStorage
💾 Simplify Android Storage Access Framework for file management across API levels.
Stars: ✭ 498 (+643.28%)
Mutual labels:  storage
rclone-drive
☁️Simple web cloud storage based on rclone, transform cloud storage (s3, google drive, one drive, dropbox) into own custom web-based storage
Stars: ✭ 30 (-55.22%)
Mutual labels:  dropbox
cruise
User space POSIX-like file system in main memory
Stars: ✭ 27 (-59.7%)
Mutual labels:  storage
lvm-localpv
CSI Driver for dynamic provisioning of Persistent Local Volumes for Kubernetes using LVM.
Stars: ✭ 86 (+28.36%)
Mutual labels:  storage
ScopedStorageDemo
medium.com/better-programming/all-you-need-to-know-about-scoped-storage-in-android-10-e621f40bc8b9
Stars: ✭ 44 (-34.33%)
Mutual labels:  storage
Ionic-2-sqlite-demo
Simple demo to show how to work with Sqlite Storage in Ionic 2
Stars: ✭ 20 (-70.15%)
Mutual labels:  storage
administrate-field-carrierwave
🌊 A plugin to upload and preview Carrierwave attachments in Administrate
Stars: ✭ 16 (-76.12%)
Mutual labels:  carrierwave
EDS
💡 💾 💽 A simple, intuitive and Efficient single cell binary Data Storage format
Stars: ✭ 16 (-76.12%)
Mutual labels:  storage
storage
Storage Standard
Stars: ✭ 92 (+37.31%)
Mutual labels:  storage
perfmonger
No description or website provided.
Stars: ✭ 39 (-41.79%)
Mutual labels:  storage
tag-storage
🗄CNCF Storage TAG
Stars: ✭ 94 (+40.3%)
Mutual labels:  storage
modernstorage
ModernStorage is a group of libraries that provide an abstraction layer over storage on Android to simplify its interactions
Stars: ✭ 982 (+1365.67%)
Mutual labels:  storage
iOS-Shared-CoreData-Storage-for-App-Groups
iOS Shared CoreData Storage for App Groups
Stars: ✭ 48 (-28.36%)
Mutual labels:  storage

Carrierwave uploads on Dropbox

This gem allows you to easily upload your medias on Dropbox using the awesome CarrierWave gem.

Installation

First, you have to create a Dropbox app. You can either create a "full dropbox" or "app folder" application. Please see this wiki for further information and gotchas.

Then, add this line to your application's Gemfile:

gem 'carrierwave-dropbox'

Then run bundle to install the gem.

To make a Dropbox app and generate a token, go here. Then, specify the token in your configuration (in an initializer for instance) like this:

CarrierWave.configure do |config|
  config.dropbox_access_token = Rails.application.dropbox_access_token
end

Note: It's advisable not to directly store the credentials in your files especially if you are using a SCM (e.g. Git). You should rather rely on Rails' secrets feature.

Then you can either specify in your uploader files the storage or define it globally through CarrierWave.configure:

class ImageUploader < CarrierWave::Uploader::Base
  storage :dropbox
end

Notable differences from other storage engines

Unlike typical CarrierWave storage engines, we do not assume an uploaded file will always be at the same path, as Dropbox UI users may move files around. As such, this gem relies on the file id. There are two significant implications to this approach:

  1. The #store_path and #store_dir methods are not guaranteed to be accurate after the initial file upload. We do not overwrite these methods as the end user will often overwrite these methods to specify where the file should initially be stored.

  2. The default #filename method is not accurate, as we are storing the Dropbox id, rather than the name of the file. It's recommended that end users overwrite the #filename method to delegate to the CarrierWave::Storage::Dropbox::File interface. For example:

    class MyUploader < CarrierWave::Uploader::Base
      storage :dropbox
    
      def filename
        if original_filename
          # Perform any file name manipulation on initial upload
        elsif file
          file.filename
        end
      end
    end

Special thanks

This project is highly based on these two gems:

Thanks to their respective authors and contributors!

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

Please see the LICENSE file for further information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].