SWFUpload v2.2.0 has been released. See the announcement.
Please test (especially Mac Users) and let us know if there are any issues. We expect a Beta period of 1 to 2 weeks and then a final release.
SWFUpload v2.2.0 has been released. See the announcement.
Please test (especially Mac Users) and let us know if there are any issues. We expect a Beta period of 1 to 2 weeks and then a final release.
October 22, 2008 - 1:54pm
everything works for me.
Mac OS X 10.5.5 , Firefox 3.0.3 , Flash Player 10,0,2,54
October 22, 2008 - 3:49pm
Mac Flash 10,0,12,36 PowerPC on Safari/Firefox.
October 22, 2008 - 10:51pm
Hello, I am glad this new version of swfupload, I've tested in Firefox 3.0, works properly, testing the swfupload Internet Explorer does not work, I understand that it is a beta.
Thank you very much for this library!!
October 23, 2008 - 3:19am
I can't confirm this.
For me the 2.0.2 beta demos works in IE with Flash Player 9,0,124,0 (last flash 9 version) and Flash Player 10,0,12,36 (latest).
Are you sure that u don't have Flash Player 8???
October 23, 2008 - 3:35am
2.2.0 Beta v1 works for me on the following browsers:
- FF (3.0.3) + Flash (10.0.12.36)
- IE7 + Flash (10.0.12.36)
- Opera (9.61) + Flash (10.0.12.36)
- Chrome (0.2.149.30) + Flash (10.0.12.36)
- Safari (3.1.2) + Flash (10.0.12.36)
- IE6 + Flash (10.0.12.36)
Now I have to test with Flash 9 and create a nice and shiny button!

Thanks for your great work gyphie!
October 23, 2008 - 7:47am
How can I customize button text font-family, defining it in button_text_style has no any effects?
October 23, 2008 - 9:23am
Thanks to gyphie for his hard work and find out a good solution with Flash Player 10. Hope you can make it much perfect and stable.
October 23, 2008 - 11:20am
Running under Firefox 3 and OS X, I get the following message:
[Exception... "'Could not find the placeholder element.' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "" data: no]
Safari throws a generic "undefined" error.
October 23, 2008 - 11:30am
Disregard that. I was missing the button_placeholder_id parameter. It works fine now.
However...
I'm using a transparent PNG file for the button. The transparent part of the file is shown as white.
I don't see a transparency setting. Is this something that is still being worked on?
Thanks!
-Mike
October 23, 2008 - 12:17pm
Just to be clear, here are some screen shots on how my upload button looked before:
http://tek42.com/screens/Picture%203.png
And now, with the new 2.2.0 version of SWF:
http://tek42.com/screens/Picture%201.png
http://tek42.com/screens/Picture%202.png
The last two show not only the transparency issue, but also that the form background changes color based on the type of upload.
Any ideas?
Thanks!
P.S. - It seems that everything is working fine on the Mac side for me.
October 23, 2008 - 12:49pm
Digging through the code, I see the function: getFlashHTML() and the lines:
var transparent = this.settings.button_image_url === "" ? true : false;
...
'<param name="wmode" value="', transparent?"transparent":"window",'" />',
I'm not sure why the file can only be transparent if there was no button image specified, but when I changed it to true, everything worked for me. I tested under Safari and Firefox on the Mac and IE 7 on windows.
Maybe this could be a configuration parameter instead?
October 23, 2008 - 6:13pm
My ButtonPlaceHolder lives inside an Update Panel. The update panels postback triggers from the upload complete handler. When this happens my 'button' dissapears.
I tried moving the constructor into a seperate function that gets called from (document).ready and then gets called again after the postback occurs (hoping this would recreate the 'button') but unfortunately this caused an error: Can't find PlaceHolder.
Any ideas or suggestions?
Thanks!
October 23, 2008 - 10:38pm
RE: UpdatePanel
Having SWFUpload in an update panel is definitely not going to work. ASP.Net replaces the entire contents of the update panel on every postback. Every time you postback your update panel you'll have to re-initialize SWFUpload.
RE: Transparency
That is a good suggestion and I never did actually test partially transparent button images. Supposedly wmode="transparent" has some bad side effects in some browsers (nothing I read was very specific about it). Adding a transparency setting is probably the way to go.
RE: font style
First read the documentation and the Adobe links in the docs for the button-text and button-text-style so you are familiar with what is supported.
Here is an example:
button_text : '<span class="myText">Hello <b>World!</b></span>'
button_text_style : ".myText { color: #0000FF; }"
October 24, 2008 - 6:26am
Hi guys,
Ive been using swfupload for quite a time now. Actually I havent been going so deep into the whole project. I installed once ago it worked fine.
Now since flash10 it stopped working and I was watching how to resolve this. I downloaded this new beta version and it seems like the button works once again.
I installed the simpledemo from the package. The flash part works great once again, the upload seems to go smooth but in the upload.php is not set anything about the whole path to the maps where the file should go into.
Is it still the same script or has that been changed aswell?
<?php
// Work-around for setting up a session because Flash Player doesn't send the cookies
if (isset($_POST["PHPSESSID"])) {
session_id($_POST["PHPSESSID"]);
session_start();
//upload file
$manuscript = date('d.m.y.H:i:s').$_FILES['Filedata']['name'];
//uploading the file in my map, make sure this map is accessable!
$path = "upload/";
$full_path = $path.$manuscript;
if(move_uploaded_file($_FILES['Filedata']['tmp_name'], $full_path )) {
// Upload is goed gegaan
$_SESSION['manuscriptnaam'] = $_FILES['Filedata']['name'];
$_SESSION['manuscript'] = $manuscript;
$_SESSION['step4'] = TRUE;
echo 'Done';
}
else {
// Upload is misgegaan
echo 'Error';
}
}
else {
// echo niks
}
?>
It doesnt work with this... upload is stuck @ 100%.. im sure maps are set right and its properties are 777.
Anyone?
*EDIT*
Now its not stuck @ 100%. But still nothing in my upload/ map...
October 24, 2008 - 4:58pm
Thank you very much for this release which also support Flash Player 10. Of course, I will implement this new version in my Drupal module because it's great. I think I will use the solution with the overlay so that button customizations are rendered well
http://drupal.org/project/image_fupload
October 26, 2008 - 2:00am
Hi all,
Great effort in getting it past the flash 10 issue..
Just one thing if I may put a request:
Because it is now a flash button, I think that should be reflected in the mouse cursor and show a pointer (useHandCursor) when over the button, it's sort of the abc of standard UIs.
Can that be added as a parameter?
If it's already there, I haven't figured it out. Where's the option?
Cheers
Ben
October 26, 2008 - 10:03am
Gyphie, thanks for reply about font styling but the problem still remains. According to Adobe Documentation flash should supports a 'font-family' CSS property, but example below has no any effects to font family inside span.theFont (font size works ok):
button_text: '<span class="theFont">Select files (max file size: 100 Mb)</span>',
button_text_style: ".theFont { font-size: 12pt; font-family: Tahoma }"
Can you explain me what's wrong in this sample?
October 26, 2008 - 3:02pm
Gyphie, sorry, I have found the mistake, inserting ';' after font-family: Tahoma fix this problem. All works ok, thanks for your great work!
October 27, 2008 - 2:57am
Hi guys,
Im still really confused about the uploadprocess. If I download the new beta version samples. Theres everything we need included? I cant find in any file to which map/path the file is going? Or do we need the script from previous versions?
Greetings
October 27, 2008 - 7:40am
My problem is solved, it was the uploadpath it said: getcwd()
I removed that and it worked
thnx guys
October 27, 2008 - 11:55am
Since my update to 2.2 I have a problem with IE6. I builded a php class to make life easier. The path structure is as the following: the class is required by fileupload.php in a folder called file. From this folder the url to the swf file is ../upload/swf/swfupload.swf. The path to upload php (from folder file) is ../upload/api/upload.php. So the relative path to my upload.php from swfupload.swf is ../api/upload.php. This still works fine in Firefox and Opera but when I use IE6 I have to structure the path like this ../upload/api/upload.php, otherwise I get 'Upload Error: 404' or 'Server (IO) Error'. As mentioned before, everthing worked fine with 2.1
October 27, 2008 - 1:58pm
I've updated my flash player from 9 to 10 and after this SWFU does not work at all. I downloaded v.2.20 and tried to look to its samples, BUT they dont work too (there is no button "select files")
According to http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_15507 my flash player version is 'WIN 10,0,12,36'.
I tried to test it in Firefox and IE. Result is the same.
Help me plzz....
October 27, 2008 - 2:22pm
@brontosaurus: I'd use absolute paths if you can.
@mennanov: Have you clear your cache. I always get old Flash or JS files after updating demos. Clearing the cache usually fixes things up.
October 27, 2008 - 2:57pm
i've found the problem:
button_image_url : "../applicationdemo/images/XPButtonNoText_160x22.png",when i commented this everything becomes work fine.
Now i have another question, how can i add/remove post params when user clicks the button "select files"?
Before 2.2.0 release i used to put "swfu.addPostparam" in the 'onclick' event of "select files" button. But now i think must exist another way to do this..?
thx
October 27, 2008 - 3:43pm
You can do this in one of the FileDialog events (fileDialogStart, fileDialogComplete).
October 28, 2008 - 1:40am
I'm having trouble cancelling previous uploads on the new version with cancelUpload. Not sure if this is a bug, or if there's something else I'm doing wrong.
Here's what I'm doing, which worked in the previous version:
var stats = swfu.getStats();
swfu.cancelUpload(0);
alert(stats.files_queued);
while(stats.files_queued>0){
swfu.cancelUpload(0); //not sure if by index works here
}
I also unsuccessfully tried this:
var stats = swfu.getStats();
while(stats.files_queued>0){
fileID=swfu.getFile(0).id;
swfu.cancelUpload(fileID);
}
Any suggestions, or is this a bug?
October 28, 2008 - 7:41am
Besides the fact that flash 9 under linux only supports the window mode, I'm not sure that there are any issues with the transparency mode. But even an option to change the wmode to transparent will be great.
October 28, 2008 - 9:59am
The file index used by SWFUpload is a global index (not a queue index). This makes all files (uploaded, canceled, queued, errored) accessible at any time by their index.
The file ID is used to get files that are in the queue.
Now that I explain that is sounds stupid but that is how it grew up and we can't change it now (without breaking things (at least until version 3)).
So, the trick is (and you can see this in the queue plugin) is to simply call cancelUpload() with no parameters. This cancels the currently uploading file or, if there is no upload, the first file in the queue.
var stats = this.getStats();
while (stats.files_queued > 0) {
this.cancelUpload();
stats = this.getStats();
}
Also, your loop logic is broken. You have to call getStats every time you loop. The stats variable doesn't automatically get updated when you perform a file operation. You have to call getStats() again to get the updated numbers.
October 28, 2008 - 3:23pm
howdy
im on mac running firefox 3.0.3 and flash ver 9,0,124,0
ive downloaded and put the new beta on a test site http://www.turntablearchives.com/upload/ but the select files button doesnt seem to show up for any demos.
i had tried the previous stable version but kept getting the uncaught exception error.
i saw the post above about commenting out a button_image_url line, but that does not help me.
also, if it helps, when i do the 'features' demo it says swfupload is not loaded. if i go to http://www.turntablearchives.com/upload/swfupload/swfupload.swf i get a blank screen, like the file is there jsut not doing anything.
thanks, hoping to get this working.
-j
ps. i understand upgrading flash might help, but since its so new id like to test the backwards compatibility first. thanks.
edit: SOLVED ftp was uploading files in ascii mode thanks to another upploader script i never got working on one particular server.
thanks for the script.
October 28, 2008 - 2:24pm
Hey Gyphie, Thanks for the super quick response! Unfortunately the code you posted still isn't working (it's the same as what I had for the last version of swfupload, which was working at the time). It now triggers the upload error handler, and then when I do the upload, the first item that I added to the queue still gets transferred. Here's the code that I currently have:
cancelQueue:function(){
swfu.customSettings.queue_cancelled_flag = true;
swfu.stopUpload();
var stats = swfu.getStats();
while(stats.files_queued>0){
swfu.cancelUpload();
stats = swfu.getStats();
}
},
so is this a bug then?
( Thanks again for the help )