RoR Resume Uploader App

This example will guide you through the code to build a simple Ruby on Rails App that works with a Minio Server. We will learn how to use the aws-sdk in our rails app to upload objects to a Minio Server. Full code is available here : https://github.com/minio/ror-resumeuploader-app, released under Apache 2.0 License.

Note: If running this example on Ubuntu, please include therubyracer gem.

4. Set Up Bucket

We've created a public minio server called https://play.minio.io:9000 for developers to use as a sandbox. Minio Client mc is preconfigured to use the play server. Create a bucket called resumes on play.minio.io. Use the mc mb command to accomplish this.

mc mb play/resumes

5. Configure AWS SDK with keys to Minio Server

Add an initializer file called aws.rb and set the credentials for Minio Server as shown below. In this example we use Minio's public server https://play.minio.io:9000. This may be replaced by your own instance of a running Minio Server in your own deployments.

NOTE: In this particular example, we complete the upload process using the upload_file api call available via the aws-sdk library. If we want to process the upload on the view, we would post the file to a presigned URL that is able to accept our POST submission.

7. Create Views

We create a form which can do a multipart upload. We will use a file_field_tag to choose the file from the filesystem and a submit tag to submit the form to the upload controller for processing.