Solved

Assistance request installing SWFUpload

Posted on 2009-07-12
6
413 Views
Last Modified: 2012-05-07
Hi expert,
My goal is creating a site with a upload functionality like on this site:

http://demo.swfupload.org/v220/multiinstancedemo/index.php

I've got a Mowes portable web server running with Apache2, PHP5, MySQL installed. And I've unzipped the content from SWFUpload v2.2.0.1 Core.zip file to the www folder.
In this folder I've got this layout:

Documentation
Flash
plugins
Core Changelog.txt
swfupload license.txt
swfupload.js

Normally I expect to find a index.php but not in this distribution.

Please how can I reach my goal?

Thanks
0
Comment
Question by:Steynsk
  • 3
  • 3
6 Comments
 
LVL 6

Expert Comment

by:basic612
ID: 24835950
Hi, there is sample PHP code for use with SWFUpload here:

http://swfupload.googlecode.com/svn/swfupload/tags/swfupload_v2.2.0_samples/samples/php/

use the files at the above URL to get you started. The file "test.php" is your index.php

There's also a user submitted sample with email notifcation here:

http://swfupload.org/forum/generaldiscussion/348

There's demos of various SQFupload implementations here:

http://demo.swfupload.org/v220/index.htm
 
 Use "View Source" to get the code you are looking for. Make the form actions be the "upload.php" script referenced at the first URL I supplied.
 
Enjoy!

0
 
LVL 1

Author Comment

by:Steynsk
ID: 24840598
HI basic612,

Thanks for your reply and aditional information.

I've put the test.php and upload.php in place and they work.
But when I copy the source of this page:

http://demo.swfupload.org/v220/multiinstancedemo/index.php

I find two lines which each load a java script that I can't find:
<script type="text/javascript" src="js/fileprogress.js"></script>
<script type="text/javascript" src="js/handlers.js"></script>
Do you know where to find those?

Thanks,
0
 
LVL 6

Expert Comment

by:basic612
ID: 24840731
0
ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

 
LVL 6

Accepted Solution

by:
basic612 earned 500 total points
ID: 24840737
there is also a queue js in there:

http://demo.swfupload.org/v220/multiinstancedemo/js/
0
 
LVL 1

Author Comment

by:Steynsk
ID: 24843318
Hi basic612,

It almost works.

I have to click this link:

      <h1 id="logo"><a href="../">SWFUpload</a></h1>
And than the upload button reveals its self. The compete code is beneath.
I think the link has to be clicked to trigger the onload function.
It there a way to trigger this when the page loads?

Thanks


<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title></title>
<link href="css/default.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="swfupload.js"></script>
<script type="text/javascript" src="js/swfupload.swfobject.js"></script>
<script type="text/javascript" src="js/swfupload.queue.js"></script>
<script type="text/javascript" src="js/fileprogress.js"></script>
<script type="text/javascript" src="js/handlers.js"></script>
<script type="text/javascript">
var swfu;
 
SWFUpload.onload = function () {
	var settings = {
		flash_url : "Flash/swfupload.swf",
		upload_url: "upload.php",
		post_params: {
			"PHPSESSID" : "NONE",
			"HELLO-WORLD" : "Here I Am",
			".what" : "OKAY"
		},
		file_size_limit : "100 MB",
		file_types : "*.*",
		file_types_description : "All Files",
		file_upload_limit : 100,
		file_queue_limit : 0,
		custom_settings : {
			progressTarget : "fsUploadProgress",
			cancelButtonId : "btnCancel"
		},
		debug: false,
 
		// Button Settings
		button_image_url : "XPButtonUploadText_61x22.png",
		button_placeholder_id : "spanButtonPlaceholder",
		button_width: 61,
		button_height: 22,
 
		// The event handler functions are defined in handlers.js
		swfupload_loaded_handler : swfUploadLoaded,
		file_queued_handler : fileQueued,
		file_queue_error_handler : fileQueueError,
		file_dialog_complete_handler : fileDialogComplete,
		upload_start_handler : uploadStart,
		upload_progress_handler : uploadProgress,
		upload_error_handler : uploadError,
		upload_success_handler : uploadSuccess,
		upload_complete_handler : uploadComplete,
		queue_complete_handler : queueComplete,	// Queue plugin event
		
		// SWFObject settings
		minimum_flash_version : "9.0.28",
		swfupload_pre_load_handler : swfUploadPreLoad,
		swfupload_load_failed_handler : swfUploadLoadFailed
	};
 
	swfu = new SWFUpload(settings);
}
 
</script>
</head>
<body>
<div id="header">
	<h1 id="logo"><a href="../">SWFUpload</a></h1>
	<div id="version">v2.2.0</div>
</div>
 
<div id="content">
 
	<h2>SWFObject Demo</h2>
	<form id="form1" action="index.php" method="post" enctype="multipart/form-data">
		<p> This page demonstrates the SWFObject plugin.  Do each of the following (one at a time) to see the plugin work: </p>
			<ul>
				<li>Uninstall your Flash Player or install a version less than 9.0.28</li>
				<li>Cause the SWF file to fail to load by deleting or renaming swfupload.swf (simulating a very slow or failed download)</li>
				<li>Disable JavaScript</li>
			</ul>
		<p>
			Each of these tests demontrate how these issues can be handled by SWFUpload and the SWFObject libraries.
		</p>
		<div id="divSWFUploadUI">
			<div class="fieldset  flash" id="fsUploadProgress">
			<span class="legend">Upload Queue</span>
			</div>
			<p id="divStatus">0 Files Uploaded</p>
			<p>
				<span id="spanButtonPlaceholder"></span>
				<input id="btnCancel" type="button" value="Cancel All Uploads" disabled="disabled" style="margin-left: 2px; height: 22px; font-size: 8pt;" />
				<br />
			</p>
		</div>
		<noscript>
			<div style="background-color: #FFFF66; border-top: solid 4px #FF9966; border-bottom: solid 4px #FF9966; margin: 10px 25px; padding: 10px 15px;">
				We're sorry.  SWFUpload could not load.  You must have JavaScript enabled to enjoy SWFUpload.
			</div>
		</noscript>
		<div id="divLoadingContent" class="content" style="background-color: #FFFF66; border-top: solid 4px #FF9966; border-bottom: solid 4px #FF9966; margin: 10px 25px; padding: 10px 15px; display: none;">
			SWFUpload is loading. Please wait a moment...
		</div>
		<div id="divLongLoading" class="content" style="background-color: #FFFF66; border-top: solid 4px #FF9966; border-bottom: solid 4px #FF9966; margin: 10px 25px; padding: 10px 15px; display: none;">
			SWFUpload is taking a long time to load or the load has failed.  Please make sure that the Flash Plugin is enabled and that a working version of the Adobe Flash Player is installed.
		</div>
		<div id="divAlternateContent" class="content" style="background-color: #FFFF66; border-top: solid 4px #FF9966; border-bottom: solid 4px #FF9966; margin: 10px 25px; padding: 10px 15px; display: none;">
			We're sorry.  SWFUpload could not load.  You may need to install or upgrade Flash Player.
			Visit the <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Adobe website</a> to get the Flash Player.
		</div>
	</form>
</div>
</body>
</html>

Open in new window

0
 
LVL 1

Author Closing Comment

by:Steynsk
ID: 31602621
Thanks for the help I did not solve the problem but found a easier sollution:
http://labs.oinam.com/flash8/fileuploaddownload/
0

Featured Post

ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question