I have a Project model which has several attachments, attachments are xml and csvs. Rather than uploading these attachments to server, I just want to save them in table ( I do however want users to upload these attachments). Each project can have multiple attachments, then I am going to parse these attachments.
Any ideas how to do this ?
I hope below railscast episodes will help you.
http://railscasts.com/episodes/396-importing-csv-and-excel
Related
I have made a mail monitor data feed to create records from mails sent by users. So far I could only copy the content of those mails and not any documents that have been attached to the mails.
I checked the transform file used by the data feed and there is no trace of attachments. And when checking the eml file generated by the data feed in the data feed directory there is also no trace of them. The files are also not copied to the file repository.
Does someone know if there is a way to customize the data feed to have it take the documents from a mail and attach them to a record?
Thanks in advance for your help,
Paco
Paco, currently the mail monitor data feeds cannot consume attachments.
Feel free to upvote the enhancement here, https://community.rsa.com/ideas/1423
I have a form for users to fill out about specific attributes first_name,last_name etc.
I need to generate a pdf from this form and also send an email with the pdf of the form as an attachment.
My approach was to save it to Amazon S3 and somehow attach it in the create method in my controller.
Any input would be greatly appreciated!
You will probably need to use something like the prawn gem https://github.com/prawnpdf/prawn . This will allow you to generate a PDF file from within your application. Your question is somewhat vague though, but you should be able to generate the PDF fairly easily using prawn
I am developing an app for an Organization that wants to send bulk emails (newsletters).
I need to create an interface to compose emails with image embed feature. I can use TInyMCE. But I dont know what to do to upload images and attach them in email and send them properly.
I saw MoxieManager. But Is it compatible with rails and if so how to do it.
Please help me how to solve this.
Thank you.
You could base64 encode your images and insert them into the content directly.
All you would need for this is a small custom plugin (which is not that difficult to write).
One option would be to use Paperclip or Carrierwave to dump them in an S3 bucket and just use img tags in the HTML part of the email.
The process would be
User uploads using TinyMCE
Controller attaches image files to the newsletter model whilst storing them on S3
Email send method does a substitution so that the names of images in the HTML text that TinyMCE added in the img tags are swapped out for the correct S3 urls.
I have a model containing several PDFs that are stored on S3 using Carrierwave, and would like to display the uploaded_at timestamp of these files in a view.
I don't see any way to accomplish this built into Carrierwave. Right now I plan to add an uploaded_timestamp field to the model, but am looking for a more elegant way to accomplish this.
Suggestions welcome.
I'm building a website which allows users to upload an Excel file. The Excel file may have many columns of irrelevant information, so I want to display an interface which allows the user to select the columns he wants.
Is there already a gem to do this is Ruby on Rails? If not, any suggestions on what APIs etc. to use and how to go about implementing this?
Thanks!
See this answer on SO which I think covers most of what you're looking for: how can I upload and parse an Excel file in Rails?