top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

What is the best method to manage image uploads in Rails

0 votes
43 views

What is the best method to manage image uploads in Rails? Is there a tool that allows auto-resizing upon image upload based on predefined dimensions? Moreover, is there any tool available that makes it possible to render / regenerate the same originally uploaded image using alternative view based styles, e.g. thumbs, 320x200 or 640x480 etc..?

posted May 16, 2016 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
0 votes

Our application has a bunch of help content(user guides) that is scattered and messy. Some is in PDFs, some is written directly in views, some is in table columns, etc.

I'm trying to find a good way to organize and manage it all from within the app, and wanted to ask the community what solutions are already out there.

My goal would be to accomplish the following:
* An easy way for editors to CRUD help content for each page of the app by browsing to that page and using and 'edit help' button.
* An easy way to organize all these pages into a cohesive and comprehensive help document for the entire site. So ideally the help content for each page would fit into a structure of chapters and sub-chapters, and the entire document could be printed as a guide.
* A way to manage tooltips (javascript popups) within this larger help context. So the help editor would also provide for some id reference that i can then pull for tooltip content for a certain widget.

+2 votes

I am trying to develop an app to manage media files I have a folder with pictures, audio and video files.

I am using Dir.glob to list the directory in my controller and in my views I am using match with regular expressions to test if the file ends in mp3 jpg mp4 3gp wav etc ... the code I wrote seems to almost work The variable @file is passed on from the controller and here is my view.

Is this a sensible way of trying to do this?

<% if @file.match("mp4") %>
 <video width="320" height="240" controls>
  <source src= <%= @file %> type="video/mp4">
 </video> 
<% elsif @file.match("mp3") %>
 <audio controls preload="auto">
  <source src = <%= @file %> >
 </audio>
<% elsif @file.match("jpg") %>
 <img src= "<%= @file %>">
<% end %>
+1 vote

I'm wonder how most people securely connect to a Postgres database on a server separate from the app server.

The ActiveRecord docs for a MySQL connection have explicit SSL options, whereas with Postgres it seems one would pass SSL options as documented for libpq.

However a quick Googling returns SO threads with suggestions to use SSH tunnels. Which I guess could be managed with something like AutoSSH.

I'd love to hear from others. Is one method faster than the other, or easier to maintain?

+1 vote

I am trying to compress the original image stored by paperclip using smusher on my local machine but I am getting this (getaddrinfo: Name or service not known (ypoweb-01.experf.gq1.yahoo.com:80).
I want to know the proper way of how to compress the paperclip original images using smusher or punypng or is there any other way to compress those images.

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...