This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Inertiable | |
extend ActiveSupport::Concern | |
included do | |
before_action :inertiable | |
end | |
def inertiable | |
response.set_header('Vary', 'Accept') | |
response.set_header('X-Inertia', true) if inertiable? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// If you want to create resumable uploading for your chunks plupload uploader | |
// you need to go in plupload.dev.js on line 1419 in xhr.onload function | |
// and change this part: | |
offset += curChunkSize; | |
file.loaded = Math.min(offset, blob.size); | |
// to this: | |
offset += curChunkSize; |