i want to create a rails app that has a lot of mixtapes, which the user can listen to and download (like datpiff.com). All the mixtapes would be uploaded by me. Each mixtape would have their own page, with the title, artist name, cover, etc.
I'm having trouble getting the architecture of the app right. What's the best way to upload all the mixtapes. (I'm thinking something like Amazon S3).
Do I have to upload a zipped file with the entire mixtape, and each individual song, or just the zipped file.
How do i show the information of each song (title, length, etc)
Ofcourse the biggest problem is the streaming of the mixtape, and the download of the file.
Can anyone guide me as to whats the best way to create this app. (Is Rails the best way to do it?)
Thanks in advance.
You're on the right track with S3. Use paperclip in conjunction with it if you want to make some sort of GUI for you to upload stuff with.
For streaming check out jPlayer, which is a jQuery plugin.
Download's no biggie. Check out Rails' send file. For sending from a remote source like S3, look here.
Related
I am new to Rails and have been diving into many tutorials and online material. I am now beginning to plan/develop my own app. From all the reading I have done I am yet to come across an industry standard way of handling user profile pictures. I have bullet point what I intend to do (below) and would like some suggestions whether this is a good approach and on the right track or whether there is a much better/secure/standard way:
add a 'ProfilePhotoPath' column to my User Model/Table of type String, which will hold the location path/name of the photo
on sign-up form implement an image upload functionality to upload profile pic and store at specified location (reference in step 1 above)
note: I have come across the 'paperclip gem' and 'imagemagick', is this a better easier approach to what I want to achieve?
There are two better ways to upload profile image using Carrierwave or Paperclip.
If you want to use Carrierwave then refer this tutorial Image Upload using Carrierwave
And if you want to go for Paperclip, then refer this links Upload image using Paperclip video tutorial
Another link with steps is Upload profile image using Paperclip
Most people use Paperclip or a more robust solution would be Carrierwave.
Both are really good. I would tell you to learn Paperclip first.
It's fairly easy if you're just starting out.
Edit: checkout this link. Click the green 'run' button to see the app.
http://runnable.com/UnnhcBiQoFhwAAEb/how-to-upload-files-using-paperclip-for-ruby-on-rails
I have been looking at carrier wave for image uploading for a website I am creating. I have heard good things about carrier wave and same with paper clip.
What I can't seem to find information on is how either gem handles its file system. Do you I need to get a plugin to make a fast query-able file system? Were these gems(specifically carrier wave) desgined to handle a large amount of users posting pictures and if so how do they save the files?
One option that I will probably use is severin's answer at the very bottom of this link.
However if these gems already have a good file system implemented then there isn't a point in over complicating things, just need some input from you guys on the matter.
I used Paperclip with Rails 2 and switched to Carrierwave when migrated to Rails 3.
Both of these solutions write the files to the public folder with a similar folder structure.
Carrierwave also has another nice gem "Carrierwave direct" which allows to upload to a remote server or S3 directly from the user browser, which is nice for scaling. It is also a requirement when using Heroku which doesn't have a file system (or didn't have one available prviously)
I want to implement a functionality that needs to parse word docs, which will uploaded by user and stored on amazon S3. The application will be on heroku. I tried catdoc but it doesn't parse urls. Can anyone suggest tool that can be used on heroku to parse word documents?
UPDATE
I want to scan an uploaded ms-word(.doc) has particular words and tag them accordingly.
If you're just wanting to upload the word document you could take a look at something like the paperclip gem.
This would allow you to save the file on amazon S3 and simply download it, but you could also extend paperclip and run post-processing on the file. This is slightly more complicated.
Like willglynn says, it would be good to know what parsing you need to do, exactly?
I am building an app where user can upload pictures. For now only one picture at a time will do. I have searched around the Web and here at Stack Overflow, but don't really seem to find what I am looking for or at least I don't know what I am looking for if it exists here at the site.
I have tried implementing paperclip and allow users to upload pictures through that and not deleting the old picture when uploading a new one. But I don't really know where to go from here to display all the pictures that a user has uploaded. How do I do this the best way? Should I continue using paperclip or is there an even more suitable gem for my needs?
I prefer carrierwave, over Paperclip, because it has more options and easy to setup. However without knowing what is your ultimate goal for your photo app, it's a little hard to tell what to do next.
If you have a roadmap or feature list, that would be helpful for us to help you with your next move.
But, if it is a simple photo app, might as well try to build it on top of an existing CMS like Refinery; you could easily build a plugin to upload images with Refinery.
I would like to rebrand my Rails app so that each user will have their own configuration like CSS, logos etc. We are storing the logos and fav icons in Amazon S3. Please let me know what is the best way to retrieve as if i retrieve from their for every request that will cost me lot of bandwidth because every page will have logo and the fav icon. I am looking for a most economic way of storing those images.
You could download the logos running wget within RoR, telling the application to store it on a special folder.
But, the best way to save bandwidth would be directly linking the logos and favicons that are in Amazon S3.