Solved

Assistance request installing SWFUpload

Posted on 2009-07-12
6
424 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

OverviewThis article demonstrates a simple search form using AJAX. The purpose of the article is to demonstrate how to use the same code to render a page and javascript (JQuery) and AJAX to make subsequent calls to refine the results. The princip…
This article discusses how to implement server side field validation and display customized error messages to the client.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

615 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