Sha256: 9ea6af4b17e04ab018203188750df86e2574f60cba09e03ab9ffd28fb4816b30

Contents?: true

Size: 524 Bytes

Versions: 16

Compression:

Stored size: 524 Bytes

Contents

module Main
  class UploadController < Volt::ModelController
    model :page

    def index
      # Nothing to setup here
    end

    def upload
      `form_data = new FormData();
       form_data.append("file", $('#file')[0].files[0]);
       $.ajax({
         url: '/simple_http/upload',
         data: form_data,
         processData: false,
         contentType: false,
         type: 'POST',
         success: function(data){
          $('#status').html("successfully uploaded");
        }
      });`
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
volt-0.9.1 spec/apps/kitchen_sink/app/main/controllers/upload_controller.rb
volt-0.9.1.pre5 spec/apps/kitchen_sink/app/main/controllers/upload_controller.rb
volt-0.9.1.pre4 spec/apps/kitchen_sink/app/main/controllers/upload_controller.rb
volt-0.9.1.pre3 spec/apps/kitchen_sink/app/main/controllers/upload_controller.rb
volt-0.9.1.pre2 spec/apps/kitchen_sink/app/main/controllers/upload_controller.rb
volt-0.9.1.pre1 spec/apps/kitchen_sink/app/main/controllers/upload_controller.rb
volt-0.9.0 spec/apps/kitchen_sink/app/main/controllers/upload_controller.rb
volt-0.9.0.pre7 spec/apps/kitchen_sink/app/main/controllers/upload_controller.rb
volt-0.9.0.pre6 spec/apps/kitchen_sink/app/main/controllers/upload_controller.rb
volt-0.9.0.pre5 spec/apps/kitchen_sink/app/main/controllers/upload_controller.rb
volt-0.9.0.pre4 spec/apps/kitchen_sink/app/main/controllers/upload_controller.rb
volt-0.9.0.pre3 spec/apps/kitchen_sink/app/main/controllers/upload_controller.rb
volt-0.9.0.pre2 spec/apps/kitchen_sink/app/main/controllers/upload_controller.rb
volt-0.9.0.pre1 spec/apps/kitchen_sink/app/main/controllers/upload_controller.rb
volt-0.8.27.beta9 spec/apps/kitchen_sink/app/main/controllers/upload_controller.rb
volt-0.8.27.beta8 spec/apps/kitchen_sink/app/main/controllers/upload_controller.rb