显示上传/发布前从文件加载的图像 [英] showing image loaded from file before upload/POST

查看:38
本文介绍了显示上传/发布前从文件加载的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下html代码可以上传图片:

I have the following html code to upload an image:

<input type="file" name="before"  size="40">
<input type="hidden" name="MAX_FILE_SIZE" value="10000000">

,我想显示用户在后端实际处理之前上传的图像.我该怎么做?

and I want to show the image that the user uploads before it's actually processed in the backend. How do I do this?

基本上我要做的是从计算机中的图像上传图像并显示它,以便可以使用jCrop对其进行裁剪,然后在后端处理该图像

Basically what I want to do is to upload an image from an image in your computer and show it so it can be cropped using jCrop and then process the image in the backend

推荐答案

  • 像往常一样将文件保存回发
  • 回发期间
    • 在页面上添加图像链接
    • 将javascript添加到"onload"中,该javascript会调用另一个页面来处理图像
    • 这篇关于显示上传/发布前从文件加载的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆