uploadify

CodeIgniter + uploadify 在 IE 下会话丢失问题的解决方案

核能气质少年 提交于 2019-11-27 07:16:56
最近需要学习并用 CodeIgniter框架对一个项目进行二次开发,由于之前一直都是使用Symfony做项目,所以再换到CodeIgniter项目上还是比较顺畅的。不过相比较之下,感觉CodeIgniter比Symfony要轻量很多,当然这不是本文的讨论点。接下来会将我遇到的问题描述出来并给出最终的解决方案,希望能帮助到和我遇到同样问题的朋友。 在项目开发中需要用到文件上传的功能,这边前端是使用 uploadify来实现文件上传功能的。在firefox完成这个功能的实现,测试并没有问题一切正常。可是在 IE 下的时候,头疼的问题就来了。文件上传成功之后,用户会话却丢失了。导致用户需再次登录,并且上一步的后续操作也没有执行(因为有权限验证,会话丢失之后验证不通过造成的)。网上搜索的结果大致都是firefox, chrome 下使用uploadify时使用了flash插件,flash中有个bug就是自身会创建一个session,这样就导致与web本身的session不一致,导致服务端权限验证失败的问题。可是我在firefox和chrome下是可以正常使用并没有出错,出错的反而是在 IE。 后来经过一番分析找到原因了,首先CodeIgniter框架中session使用的不是php原生的session机制而是自己的一套东西,CodeIgniter会把session保存到Cookie中

Uploadify: show error message from HTTP response

半世苍凉 提交于 2019-11-27 04:31:19
If the server returns an error (HTTP response code != 200) when uploading a file with Uploadify, the uploaded file gets a red background and a message is show like this: file.jpg (52.78KB) - HTTP Error indicating that there was a HTTP Error. But that's not very useful to the the user. How can I make it show a more detailed error message? Like: 'Not a valid image' or 'Quota full'? I was thinking of passing those messages in the HTTP response body, but Uploadify doesn't pick them up. Is there a known way to pass error messages back to Uploadify? Take a look at these two posts in the uploadify

Uploadify plugin doesn't call Java Servlet

岁酱吖の 提交于 2019-11-27 01:30:06
i just started using Uploadify flash plugin instead of standard HTML UI. And met the next problem: when I click "Upload Files" link,that progress is shown and "completed" status is appeared, but in reality - it didn't happened anything,Java Servlet isn't called from backend. There is upload servlet and uploading performed next way earlier : < form enctype="multipart/form-data" method="post" target="uploadFrame" action="<%= request.getContextPath() %>/uploadFile?portletId=${portletId}&remoteFolder=${remoteFolder}">... After providing Uploadify plugin, UI now looks like: plugin part

上传大文件的解决方案

和自甴很熟 提交于 2019-11-26 19:16:56
需求:项目要支持大文件上传功能,经过讨论,初步将文件上传大小控制在500M内,因此自己需要在项目中进行文件上传部分的调整和配置,自己将大小都以501M来进行限制。 第一步: 前端修改 由于项目使用的是BJUI前端框架,并没有使用框架本身的文件上传控件,而使用的基于jQuery的Uploadify文件上传组件,在项目使用的jslib项目中找到了BJUI框架集成jQuery Uploadify的部分,这部分代码封装在bjui-all.js文件中, 在bjui-all.js文件中的全局变量定义中有以下部分代码,这就是定义的有关于上传的Uploadify控件的重要变量: upload:{uploadLimit:5,fileSizeLimit:31744,removeTimeout:0.8} 以上三个变量代表的含义是: uploadLimit :表示上传文件个数的限制,5表示文件上传个数限制是5个 fileSizeLimit :表示上传文件大小的限制,31744单位是KB,也就是表示31M removeTimeout :表示移除文件的时间限制 继续查找使用到这些变量的地方,看到了文件大小超出限制等 了解了BJUI前端框架对于上传大文件的限制,可以这样使用,增大文件上传大小和数量,可以按照如下进行修改,我们在bjui-all

How do I get jQuery's Uploadify plugin to work with ASP.NET MVC?

随声附和 提交于 2019-11-26 18:58:41
问题 I'm in the process of trying to get the jQuery plugin, Uploadify, to work with ASP.NET MVC. I've got the plugin showing up fine with the following JavaScript snippet: <script type="text/javascript"> $(document).ready(function() { $('#fileUpload').fileUpload({ 'uploader': '/Content/Flash/uploader.swf', 'script': '/Placement/Upload', 'folder': '/uploads', 'multi': 'true', 'buttonText': 'Browse', 'displayData': 'speed', 'simUploadLimit': 2, 'cancelImg': '/Content/Images/cancel.png' }); }); <

How to alter this javascript with Greasemonkey?

折月煮酒 提交于 2019-11-26 17:50:05
问题 Here is the script: <script type="text/javascript"> // <![CDATA[ $(document).ready(function() { $('#file_upload').uploadify({ 'uploader' : '/uploadify/uploadify.swf', 'script' : '/upload2.php', 'cancelImg' : '/uploadify/cancel.png', 'folder' : '/uploads', 'auto' : false, 'onError' : function (event,ID,fileObj,errorObj) { alert(errorObj.type + ' Error: ' + errorObj.info); }, 'fileExt' : '*.wma;*.mp3', 'fileDesc' : 'Audio Files', 'scriptData' : {'fileID':'20541','hash':

带进度条的文件批量上传插件uploadify

爱⌒轻易说出口 提交于 2019-11-26 17:25:45
有时项目中需要一个文件批量上传功能时,个人认为uploadify是快速简便的解决方案。 先上效果图: 一. 下载uploadify 从官网下载uploadify的Flash版本(Flash版本免费,另一版本HTML5版本需要付费) 下载地址: http://www.uploadify.com/download/ 下载后直接把文件解压,然后放在项目中 二. 在项目中使用 在页面中引入: <!--引入Jquery--> <script src="js/jquery-1.11.3.min.js"></script> <!--引入uploadify--> <script type="text/javascript" src="uploadify/jquery.uploadify.js"></script> <link type="text/css" href="uploadify/uploadify.css" rel="stylesheet" /> 完整页面代码 <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head

Sessions and uploadify

旧巷老猫 提交于 2019-11-26 15:49:03
问题 I'm using uploadify, and i can't set sessions in my php files, my script looks like this: $("#uploadify").uploadify({ 'uploader' : '/extra/flash/uploadify.swf', 'script' : '/admin/uploads/artistsphotos', 'scriptData' : {'PHPSESSID' : '<?= session_id(); ?>'}, 'cancelImg' : '/images/cancel.png', 'folder' : '/img/artists', 'queueID' : 'fileQueue', 'auto' : false, 'multi' : true, 'onComplete' : function(a, b, c, d, e){ }, 'onAllComplete': function(event,data){ $bla = $('#art').find(':selected'

Getting Uploadify Working in C#

久未见 提交于 2019-11-26 13:59:52
问题 This seemed like it should be easy, but I have had trouble getting it to work. I don't know why it doesn't. It is just showing the normal file input. Is there any code / examples to get this working. I am getting frustrated... Thank you all. 回答1: This is a video tutorial on how to get started using C# and Webforms, should help you. http://casonclagg.com/articles/6/video-tutorial-uploadify-asp-net-c-sharp.aspx Can you post your code though so that I might be able to show you what you are doing

Uploadify (Session and authentication) with ASP.NET MVC

一笑奈何 提交于 2019-11-26 12:53:38
When I use Authorize filter on an action or a controller used by uplodify ( http://www.uploadify.com/ ) the action isn't reach... moreover Session are not retrieved. I found this to retrieved user session : http://geekswithblogs.net/apopovsky/archive/2009/05/06/working-around-flash-cookie-bug-in-asp.net-mvc.aspx But how to use it with [Authorize] filter and retrieved session ? To correct this I propose you a solution... Send the auth cookie value and session id cookie value with uploadify and recreate it before session is retrieved. here is the code to implent in the view : <script> var auth =