sto usando Valums Ajax uploader. tutte le grandi opere in Mozilla con questo codice:MVC Valums Ajax Uploader - IE non invia lo streaming in request.InputStream
Vista:
var button = $('#fileUpload')[0];
var uploader = new qq.FileUploader({
element: button,
allowedExtensions: ['jpg', 'jpeg', 'png', 'gif'],
sizeLimit: 2147483647, // max size
action: '/Admin/Home/Upload',
multiple: false
});
Controller:
public ActionResult Upload(string qqfile)
{
var stream = Request.InputStream;
var buffer = new byte[stream.Length];
stream.Read(buffer, 0, buffer.Length);
var path = Server.MapPath("~/App_Data");
var file = Path.Combine(path, qqfile);
File.WriteAllBytes(file, buffer);
// TODO: Return whatever the upload control expects as response
}
che è stato risposto in questo post:
Tuttavia, questo problema non funziona in IE. Ho trovato questo, ma io non riesco a capire come implementarlo:
IE non invia il flusso in "request.InputStream" ... invece ottenere il flusso di input attraverso il HttpPostedFileBase da le Request.Files [] collezione
Inoltre, questo qui che mostra come questo ragazzo ha fatto, ma non sono sicuro come cambiare per il mio progetto:
Valum file upload - Works in Chrome but not IE, Image img = Image.FromStream(Request.InputStream)
//This works with IE HttpPostedFileBase httpPostedFileBase = Request.Files[0]
come HttpPostedFileBase;
impossibile capirlo. per favore aiuto! grazie
Yeah! mi hai appena salvato circa un milione di ore - grazie. –
Uomo eccellente !!!! +10 –
Come posso duplicare questo per funzionare con PHP? – dallen