IE SWF caching big problem !

Jan 12, 2009 at 3:09 PM
Hi guys!
i'm recently using this app and it's awesome. But i've serious problems with it. The big one is that IE is caching the SWF file, so when i reload the page i got a JS error and i can't use the uploader. To fix this i must delete the SWF file from my Temporary Files and then it works good.

I tried to use meta tags to prevent caching files, but nothing happens.
The meta that i've been using are:

<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="Expires" content="Mon, 04 Dec 1999 21:29:02 GMT" />

When i clean temporary files and i press F5 to reload the page, the SWF file appears and works good. But when i reload the page again, the error occurs.
is there any fix for this?.
Sorry my english, i'm from Argentina, so i speak Spanish. haha !

Thanks!
Diego.


Jan 12, 2009 at 5:37 PM
Diego, we will investigate the issue described! Thanks for your feedback!
Raul
Jan 14, 2009 at 9:35 AM
I have the same problme as you have dmantelli,

ra00l do you have any solution or someone else?

Thanks Phil
Jan 14, 2009 at 12:08 PM
No i don't. I still waiting for a solution..
Good luck !
Jan 15, 2009 at 8:48 AM
Guys, sorry for the late response. 
 
I have managed to go around the problem, by adding a CustomSWFPath property, which will let you specify where you want the swf to be used from.
By setting that to a custom path, it will bypass the WebResource handler, and everything will work.

I will continue to investigate the original error, but meanwhile you could use the control with this workaround.
I just commited on svn the fix.

Thanks,
Raul
Jan 19, 2009 at 5:40 PM
Thank you!!!
works great!
Feb 8, 2009 at 1:28 PM
Great, Million Thanks
Feb 17, 2009 at 8:06 PM
Hi,

I've been trying to make use of the Fancy Upload Control, but I ran into the same SWF caching problem described above.  I see that the others have had success using the CustomSWFPath property.  I've tried using it, but end up getting javascript errors when I click the browse button: _flash_argumentsToXML is not defined.

*It's failing on this line of code in Swiff.js:

Swiff.remote = function(obj, fn){
 var rs = obj.CallFunction('<invoke name="' + fn + '" returntype="javascript">' + __flash__argumentsToXML(arguments, 2) + '</invoke>');
 return eval(rs);


*Here's the way I have the Control set up:

        <piece:Upload
            Runat="server"
            ID="fancyUpload"
            OnFileReceived="upload_FileReceived"
            InstantStart="False"
            BrowseText="Browse"
            Trigger="Button1"
            CustomSWFPath="C:\SharePoint\LOCAL\SharpPieces\SWIFF\" />

It works fine from FireFox if I don't use the CustomSWFPath property, but I need it to work in IE too.
Maybe I'm not using the property correctly.  Will you please provide an example of how it is to be used?

I've had a difficult time finding a good upload control allowing multiple file selection, so I was glad to have found this.  You've done a great job with it.  Hopefully I can get over this hurdle and will be able to use it.

Thanks!
Feb 17, 2009 at 9:07 PM
Your problem is this line
CustomSWFPath="C:\SharePoint\LOCAL\SharpPieces\SWIFF\"
You should put a path that is relative to your website, like "/resources/myres.flv"
Feb 18, 2009 at 10:54 PM
Thanks for the speedy reply.  Using a relative path fixed the problem for the most part.  Although, I now get an error when accessing the control in Firefox from a machine other than the server itself.  (Even though it works in IE now)

It doesn't matter though, because it turns out I'm not going to be able to use the control since there are some problems with using java applets / flash plugins etc with NTLM authentication.

In any case, thanks again for the help.
Mar 3, 2009 at 1:54 PM

I have tried your suggestions to fix this problem, but I still have the problem.

The intresting part of my aspx-file:


<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Upload.aspx.cs" Inherits="Upload" %>

<%@ Register Assembly="SharpPieces.Web.Controls" Namespace="SharpPieces.Web.Controls"
    TagPrefix="piece" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <piece:Upload runat="server" ID="fancyUpload" OnFileReceived="upload_FileReceived"
            InstantStart="False" Trigger="Button1" CustomSWFPath="/myres.flv"   />
        <ul class="photoupload-queue" id="photoupload-queue" />
        <div>
            <asp:Button ID="Button1" runat="server" Text="Button" />
        </div>
    </div>
    </form>
</body>
</html>


Nothing happens when I click the Browse Files-button. I also have tried to delete all temporary internet files from my IE but it doesnt works. In FF everythings works fine...

Thanks in advance! 

May 4, 2009 at 9:05 PM
I'm having the same problem as AnchorSteam.  Everything works good in FF but it won't work in IE.  I'm running Flash 10 in both browsers.  The error in IE says- Line 2951, Char 2, Error: Unspecified error. 
I tried using the CustomSWFPath parameter above but CustomSWFPath is not a valid attribute for Upload.  I'm using the DLL from
http://www.codeplex.com/Project/Download/AttachmentDownload.ashx?ProjectName=SharpPieces&WorkItemId=6537&FileAttachmentId=1549

You guys also keep showing the Trigger attribute, but all I have is a UploadTrigger attribute.  Am I using the wrong DLL or something??
Do I need to include any other files in my project?  All I did was use the DLL from above link from SharpPieces.com.

Any help would be greatly appreciated.

Thanks,
Brandon
Jul 2, 2009 at 1:52 PM

Hey Guys I 'am having the same...
But the demo app wors for me

Just download:   http://sharppieces.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=18578#DownloadId=46855