Skip to content

Commit

Permalink
Updated upload directory to reflect real use
Browse files Browse the repository at this point in the history
  • Loading branch information
adammulligan committed Jul 30, 2012
1 parent 08f6b03 commit 4bd1c9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/app.rb
Expand Up @@ -12,7 +12,7 @@ class BeamMeUp < Padrino::Application

post '/', :provides => :json do
if params[:upload] && (tmpfile = params[:upload][:tempfile]) && (name = params[:upload][:filename])
File.open(File.join(Dir.pwd,"public/uploads", name), "wb") { |f| f.write(tmpfile.read) }
File.open(File.join(Dir.pwd,"/home/adam/downloads/_watch", name), "wb") { |f| f.write(tmpfile.read) }

return {:success => "File uploaded"}.to_json
end
Expand Down

0 comments on commit 4bd1c9e

Please sign in to comment.