Sha256: f630321ed81adc0ff73edb0d81326e06c3c1f764e609a4625f911ade53fc0711
Contents?: true
Size: 560 Bytes
Versions: 3
Compression:
Stored size: 560 Bytes
Contents
class Upload < Merb::Controller def start # Assign the parameter to an instance variable @args = params render end def index @args = params render 'start' end def upload puts params[:file].inspect FileUtils.mv params[:file][:tempfile].path, ::Merb::Server.config[:dist_root]+"/public/files/#{params[:file][:filename]}" render end def file send_file MERB_ROOT+'/public/files/'+params[:file] end def to_s "<html><body>Upload controller, no mathing action</body></html>" end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
merb-0.0.4 | examples/sample_app/dist/app/controllers/upload.rb |
merb-0.0.5 | examples/sample_app/dist/app/controllers/upload.rb |
merb-0.0.6 | examples/sample_app/dist/app/controllers/upload.rb |