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