Topic: unable to upload larger files in rails

hii,i am trying to upload some files to filesystem using rails applicationwhen i use small size file everything is perfect but i when goes for larger files i got error this is my code

Invalid argument - //

this is my code

#This is model file

class DataFile < ActiveRecord::Base

name =  upload['datafile'].original_filename   
directory = ""//"
    # create the file path
    path = File.join(directory, name)
    # write the file, "wb") { |f| f.write(upload['datafile'].read) }

#This is my model file
class UploadController < ApplicationController
def index
     render :file => 'app\views\upload\uploadfile.rhtml'
  def uploadFile
    post =[:upload])
    render :text => "File has been uploaded successfully"

but when i tried to copy at local machine folder ,everything is fine whatever the size

Last edited by amittomer25 (2010-09-03 02:00:44)

Re: unable to upload larger files in rails

Did you forget to paste the error message?