How to download a file uploaded through attachment_fu?


I’m new to rails world. I tried out simple example using attachment_fu.

I have successfully uploaded a file and also can delete the file just by
giving the id.

I need help in downloading the file saved in the file system.

send_file(File.join(FILE_PATH, file_name), :filename => @video.filename,
:disposition => ‘attachment’)

This doesn’t works since attachment_fu follows some procedure in saving
the files like



There are “full_filename” and “public_filename” methods in
‘file_system_backend.rb’ in attachment_fu. Using these methods you can
get the full path of the file. You just have to call these methods for
your model object.


my_obj.full_filename # Returns the full path of the file

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs