Viewing uploaded documents(pdf, .doc, .xls, etc.) - ruby-on-rails-3

I have a simple program were users can create, show and edit projects. One of the features of the projects is file upload. I have experimented with several different methods of uploading the files including carrierwave and paperclip. The problem I am having is that I need users to be able to view the files that are uploaded. Ex: open pdfs or excel spreadsheets that other user have uploaded to that project. I am new to rails and have no idea how to do this. All i can find are tutorials on how to upload and show pictures. Does anyone know how I can do this? I have looked at send_data and send_file but cannot figure out if I should use these or how to implement them. Thanks in advance
I'm using rails 3.0.10 and ruby 1.8.7 on an Ubuntu server

Related

Upload a xml file using emberjs

I want to make a file upload with ember.js. I am using ember 1.9 with django the file I want to upload is an xml file i want to give the user the possibility to upload up to 4 files. I have seen some older solutions from back in 2013 but was wander if there is something new you might suggest.
P.S. I am not using ember CLI.

how to unlock a PDF file extracted from an iPhone app?

I've downloaded the Cosmopolitan magazine on my iPhone not so long ago and from there I purchased the Sept. 2014 issue of the magazine. However, I can't save or e-mail my purchased issue from the app, all I can do is screen-cap it but that wouldn't give me a quality good enough to read the small text on the pages. So I eventually googled it and ended up downloading iFunBox which gives you the contents of your iPhone applications. From there, I looked up the content folders of the Cosmopolitan app and ended up with a PDF file which I'm assuming is the Sept. 2014 issue, which is cool, but the problem is that it's locked :(
I'm wondering if anyone can help me with unlocking the said PDF file?
Here's the PDF file: https://drive.google.com/file/d/0B3Tf7C_JNaZgeUJOa0NqYjB6Vkk/view
and here's the Cosmopolitan app contents folder: https://drive.google.com/file/d/0B3Tf7C_JNaZgVE54dWZyaUpYazA/view?usp=sharing (the p/w might be somewhere in the files there but I failed to find, OTL)
You could try a password removing utility. Here are 7 I found when googling for "pdf password removal"
http://pcsupport.about.com/od/toolsofthetrade/tp/pdf-password-remover.htm

Add Images to an existing .xlsx or .xlsm file using Rails 3

The ruby gem that allows image insertion in an excel file is axlsx. However. it does not seem to support yet
the ability to add an image to an existing excel file. Is anyone aware of a ruby gem that can be used for this purpose?
I am using Rails 3 and Ruby 1.9.3.
Have you tried the spreadsheet gem? Also, check out some other spreadsheet gems at the Ruby Toolbox.

Filepicker.io rails app with multiple files

I can't find any examples or documentation for how to handle multiple file uploads with my rails 3.2 application and filepicker.io. Can anyone assist?
It was just recently added, see https://github.com/Filepicker/filepicker-rails/pull/35

Localization files in app bundle

I have localization with 3 languages. Everything was working; then I wanted to change something in localization files.
My changes didn't have any effect, and I can't figure out the reason.
The big idea that it worked and still is finding old resources.
This is working for me when I want to print the bundle of localization file:
PATH/MyFirsy.app/en-LT.lproj> (not yet loaded)
My steps:
Getting your resource files ready for localization
Collecting all the texts used in the application in resource files
Translating the resource files
Integrating the resource files back in the application
Maybe someone who had this problem could help me.
for localization to be in affect, you also need to change your simulator's/device's language. you can check the same in your case.