Hi,
i am trying for uploading multiple files using attachment_fu plugin.
i use MultiSelector javascript for this purpose.It helps me to store
minimum three files before uploading.but when i deleted one file
and replace with another file.the rest of the files including this
files are not save in the database.
i include required javascript files as attachment.
here is my code,
in view
in controller:
def create
i = 0
while params['file_'+i.to_s] !="" && !params['file_'+i.to_s].nil?
# puts params['file'+i.to_s]
p = Hash["fileindex"=>{"uploaded_data"=>""}]
# puts p
p["fileindex"]["uploaded_data"] = params["file_"+i.to_s]
# puts p["Fileindex"].size
# if p["Fileindex"].size>0
@fileindex = Fileindex.create! p["fileindex"]
# end
i += 1
end
end
May I know y u need 3 uploads at a time. I guess with attachment_fu u
cant upload and save multiplt files at one shot. Instead u need to
itrate and save.
if u could explain the requirement I may suggest an alternative
solution.
May I know y u need 3 uploads at a time. I guess with attachment_fu u
cant upload and save multiplt files at one shot. Instead u need to
itrate and save.
if u could explain the requirement I may suggest an alternative
solution.
Anyway Is the requirement related to praps.com ??
Regards,
Ratnavel.
thanks Ratnaval,
i want to upload multiple files.in view page i attach
may one ,two or three(maximum three)files without delete
any files and upload those files.it works beautifully.
all files are successfully saved in the database.
but there exist a delete button.If i delete one
attach files and replace it with another file and try to
upload it,it not works.the changed file is not save in
the database.
iam trying to upload multiple files using attachment_fu
plugin ....i have followed by ur code but i did't get it... can u plz
explain it more briefly... its very urgent......