Fragment of the multiboot script file. Here headings go:

self.xhr.open("POST", params.url); var boundary = "xxxxxxxxx"; self.xhr.setRequestHeader("Content-Type", "multipart/form-data, boundary="+boundary); self.xhr.setRequestHeader("Cache-Control", "no-cache"); var body = "--" + boundary + "\r\n"; body += "Content-Disposition: form-data; name='"+(params.fieldName || 'file')+"'; filename='" + params.file.name + "'\r\n"; body += "Content-Type: application/octet-stream\r\n\r\n"; body += self.reader.result + "\r\n"; body += "--" + boundary + "--"; 

How to save a file in php, if the $_FILES empty?

    1 answer 1

    Not so long ago, they asked for another resource or it’s possible, so I made an example of a multi-drop (several files at a time) on ajax

    I think it will help. Naturally, the browser should support FileAPI

    • Interesting) - Andrei Arshinov
    • yeah FileAPI under ie done ((( - evgeniy
    • I need to screw this script here xiper.net/collect/js-plugins/ui/ ... I can not figure out how to save files ..... - evgeniy
    • FileApi is supported by FireFox, Chrome, Opera (like) about the rest is not up to date. If you use the js script shown in the example, saving will not be any different from the traditional way of saving files on the server side - Alex Kapustin
    • Well, I don’t have it in the $ _FILES array, where I’ll take it, it loads somewhere, it shows 100%, and where the hell keeps it ... - evgeniy