Over a million developers have joined DZone.

Uplaod files and images from you android to your desktop/laptop

·

 

#!/usr/bin/env ruby
# Author : Emad Elsaid (https://github.com/blazeeboy)
require 'sinatra'

set :port, 3000
set :environment, :production

get '/' do
	<<-EOT

	
	
Choose files
EOT end post '/upload' do params['files'].each do |f| tempfile = f[:tempfile] filename = f[:filename] FileUtils.copy(tempfile.path, "./#{filename}") end redirect '/' end
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}