creating files

S

Sijo Kg

Hi
i have
<%= file_field_tag "logo" %> using that i upload image files.,.In
controller how can i write this to a folder with a given fixed name..For
example suppose uploaded file original name is abc.png,(or abc.jpeg )but
in controller i have to name it to logo.png or logo.jpeg and write it to
a folder /opt/upload/logo.png (or /opt/upload/logo.jpeg) That means
if the file there already exists it shud overwrite also ..How can i do
this .Please help

Thanks in advance
Sijo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top