Closed LuisDominguez closed 9 years ago
I'd check 2 things:
File file = new File(getPath(uri_video));
really pointing to a file and does it have content.Hello thanks for resonder
first point: Yes file exist and really ponting for video file
second point: i puts a request.body.read and not empty have A
im try with image=nil StringIO.open(request.body.read) do |data| data.class.class_eval { attr_accessor :original_filename, :content_type } data.original_filename = "temp#{DateTime.now.to_i}.mp4" data.content_type = "video/mp4" image = data end
fp = File.open("/home/aa/vv/video_rest/video_mp.mp4", "wb") fp.write(image) fp.close
is ruby on rails but i dont know if body http content are correct
for this second try, 24bytes is size for file result
24 bytes implies there is some kind of error. Probably you'll have to debug client-side and/or server-side. I'm afraid I cannot help you from distance... The tests for File-upload of DavidWebb pass. I suppose it's something on the server side.
thanks, but i used other libreary to send file with params on headers dont on body, on ruby on rails dont get a file on request.body
Hello i add a video file on request
But when i recieved a body on action post
file = request.body.read fp = File.open("/home/master/Escritorio/video_rest/video_mp.mp4", "wb") fp.write(request.body.read) fp.close
my file video_mp.mp4 created size a 0 byte