File (.PDF) for Ajax / WebMethod WebForms


I would like to know how to get the information of a pdf file (binary, name, size)

 public class Arqs: IHttpHandler

    Funcoes f = new Funcoes();

    public void ProcessRequest(HttpContext context)

            context.Response.ContentType = "text/plain";
            var httpPostedFile = HttpContext.Current.Request.Files["Up_File"];

How can I access this file through my ajax?

var data = new FormData();
data.append("Up_File", oFiles[oItem]);

    url: 'Arqs.ashx',
    data: data,
    processData: false,
    contentType: false,
    cache: false,        
    type: 'POST',
    success: function (data) {

I want to pass this information out of the file plus others for this other method:


    type: "POST",
    contentType: "application/json; charset=utf-8",
    url: "alt_de_dados.aspx/Atualiza_dados",
    data: JSON.stringify(DTO),
    dataType: "json",
    success: function (data) {
asked by anonymous 19.10.2017 / 14:07

0 answers