paper clip aws s3

21 views
Skip to first unread message

Anu Sebastian

unread,
Jul 10, 2014, 5:40:00 AM7/10/14
to rubyonra...@googlegroups.com
in application path public/users/user_list.csv is present. I need to
upload this CSV file to s3 . Now, in S3 it is storing as text file, not
as CSV. I am Using paperclip.

file_to_s3 = File.open("public/users/user_list.csv")
CsvFileStorage.create!("csv" => file_to_s3) return report_name

How can I read & convert this local CSV & upload it to s3.

Please help.

--
Posted via http://www.ruby-forum.com/.

Colin Law

unread,
Jul 10, 2014, 6:48:33 AM7/10/14
to rubyonra...@googlegroups.com
On 10 July 2014 10:38, Anu Sebastian <li...@ruby-forum.com> wrote:
> in application path public/users/user_list.csv is present. I need to
> upload this CSV file to s3 . Now, in S3 it is storing as text file, not
> as CSV. I am Using paperclip.
>
> file_to_s3 = File.open("public/users/user_list.csv")
> CsvFileStorage.create!("csv" => file_to_s3) return report_name
>
> How can I read & convert this local CSV & upload it to s3.

CSV files *are* just text files. Comma Separated Values in a text file.

Colin
Reply all
Reply to author
Forward
0 new messages