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 - //192.168.147.17/Smruti/streams/predator_720x480_5mbps_30fps_17minclip.264.filepart


this is my code



#This is model file

class DataFile < ActiveRecord::Base

def self.save(upload)   
name =  upload['datafile'].original_filename   
directory = ""//192.168.147.17/Smruti/streams"
    # create the file path
    path = File.join(directory, name)
    # write the file
    File.open(path, "wb") { |f| f.write(upload['datafile'].read) }
  end
end

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

     
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?