Fog.io - Ruby
Learn how to configure Fog.io for use with Filebase.
What is Fog.io?
Fog.io is a cloud services library for Ruby. Fog.io allows you to seamlessly integrate your cloud configuration into your Ruby application.
Read below to learn how to use Fog.io with Filebase.
1. Install Fog.io:
gem install fog
2. Download and install the fog-aws
package:
fog-aws
package:gem install fog-aws
3. Create the file ~/.fog
with the following content:
~/.fog
with the following content:4. In your Ruby application, add fog-aws
as a dependency:
fog-aws
as a dependency:require 'fog/aws'
5. Connect to the Filebase S3 service:
Using Fog-AWS
Creating a file:
Listing files:
Generating a Pre-signed URL for a file:
Copying a File to a Bucket
Using Multipart Upload
To speed transfers of large files, the concurrency option can be used to spawn multiple threads. Note that the file must be at least 5 MB for multipart uploads to work. For example:
Last updated