Somewhat of a noob here. I have a table that has 5 file fields, and
they are named file, file2, file3, file4, file 5. All of them will be
In firefox, I can upload these files just fine, and they will show up
as Document.doc. In IE, it prepends the entire path.
Which makes the file unreadable, and un-downloadable. I know that the
sanitize method is supposed to fix this, but I can’t figure out how to
make it work. Here is what I’ve written in my model:
filename = File.basename(filename.gsub("\", “/”))
Doesn’t work. What do I need to do? This is bugging me so much.