上传图片客户端 [英] Upload Image client side

查看:76
本文介绍了上传图片客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将图像上传到本地站点文件夹,并且我的站点完全基于html.所有响应和请求均由wcf rest服务映射,因此没有使用服务器端页面.我尝试使用"Scripting.FileSystemObject"上传图片;但在mozilla firefox中不起作用.因此,请提出建议,我可以使用什么来上传纯HTML和javascript工作的图像.

谢谢,

I need to upload image to my local site folder, and my site is fully html based. The all response and request are mapped by wcf rest service so there is no server side pages used. I tried to upload image with "Scripting.FileSystemObject" but it is not working in mozilla firefox. So please, Suggest me what can i used for upload image which is working purely html and javascript.

Thanks,

推荐答案

没有方法仅使用HTML和JavaScript上载文件.这些都是客户端,您需要某种类型的.NET,PHP等服务器端处理才能将文件上传到服务器.
There is no method to upload files using only HTML and JavaScript. These are both client-side and you need server-side processing of some type, .NET, PHP, etc. to upload files to a server.


是的,没有客户端解决方案用于图像上传.因此,可以通过调用服务器端处理程序并使用处理程序来完成所有进程.

我在代码中使用了处理程序,并使用了名为Control的"Uploadify"之一.

我还使用了两个".js"和一个Flash文件,这些文件是通过
下载的
http://www.uploadify.com/download/
Yes, there are no client side solution for image upload. Hence one can do it by calling the server side handler and do all the processes with handler.

I used handler in my code and used one of "Uploadify" named Control.

I also used two ".js" and one flash files which i have downloaded through

http://www.uploadify.com/download/

<script src="Scripts/jquery.uploadify.v2.1.4.js" type="text/javascript"></script>
<script src="Scripts/swfobject.js" type="text/javascript"></script>




在包含以上两个文件和一个uploadify.swf之后,调用uploadfiy函数.

请参见以下代码.




And after include above two files and one uploadify.swf call the uploadfiy function.

See the following code.


(文档).ready(function(){
(document).ready(function () {


这篇关于上传图片客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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