www.tutorialspoint.com Forum Index
Register FAQMemberlistUsergroupsTutorials PointLog in
Reply to topic Page 1 of 1
file uploading error
Author Message
Reply with quote
Post file uploading error 
my view file is like this..

<form action="/uploadFile" method="post" enctype="multipart/form-data">
<label>Select :
<input type="file" name="upload" />
</label>
<input type="submit" value="upload" />
</form>

but when i click on the upload buton it throws error.. ActionController::InvalidAuthenticityToken in UploadController#uploadFile and the parameters passese as {"upload"=>#<File:C:/WINDOWS/Temp/RackMultipart20110329-2804-8zapc3-0>} thogh i browsed for d:/cv.txt

my uploadFile action is like

def uploadFile
post = DataFile.save(params[:upload])
render :text => "File has been uploaded successfully"
end

and the DataFile.save method is same shown in the tutorials here... http://www.tutorialspoint.com/ruby-on-rails-2.1/rails-file-uploading.htm

can anyone help me?plz..


_________________
my skype id is santattech.. u can send me the request.. so that we can solve problems on discussions..
View user's profile Send private message
Reply with quote
Post  
May be you are using different version of RoR. Just check your version.

Thanks

View user's profile Send private message Send e-mail
Reply with quote
Post Post Confirmation 
Thanks for your post. This post will be reviewed by webmaster and will be online very soon.!


_________________
my skype id is santattech.. u can send me the request.. so that we can solve problems on discussions..
View user's profile Send private message
Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum