I get it working fine in chrome if I remove the leading slash in the file name so that it is "filename instead of" / filename. 404 comes from a file not found in send_file
# foo.rb require 'sinatra' get '/update/dl/:upd' do filename ="uploads/#{params[:upd]}"
However, this is really a big security hole, the user can download everything that has access to the sinatra process, I named my application synatra foo.rb, and this request loads the sinatra script:
http://localhost:4567/update/dl/..%2Ffoo.rb
source share