0
Ajax jquery 호출을 사용하여 firefox에서 다운로드 팝업 상자를 트리거하려고합니다. 내 jQuery 코드는 이것이다 : 내 컨트롤러에서레일즈 3을 사용하여 다운로드 팝업 상자를 트리거하는 방법
function download_clip(){
$.ajax({
url: '/controller/download_clip',
type: "GET",
complete: function (data_response) {
status = data_response.responseText; //the response variable from the presentation controller
console.log(status);
}
});
};
:
def download_clip
send_file "public/output.mp4", :type=>"video/mp4", :filename => "output.mp4", :x_sendfile=>true, :disposition => 'inline'
end
모든 아이디어를 어떻게 다운로드 상자를 유발하는?