File Upload In Flash?
Hi gang I am hoping someone can help me!
I am using the file reference class (FILE UPLOAD) in an application for the web.
it seems to work eg. listeners and messages relaying back to the flash doc.
however the actual file itself that i am uploading does not show up in the folder i am uploading to!!???
The php code and actionscript code is taken straight from F1 help in flash....so what gives?
Why is it not working ??? this issue occurs for both Firefox AND IE!!
HELP!
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 08-02-2007, 11:24 AM
View Complete Forum Thread with Replies
Sponsored Links:
Audio File In Flash-file Upload Problem
sir/mam,
i am doing web designing usingflash and no have to embed audio file into it. both mp3 and avi are too large for a flash file to upload.I have sound forge and have even reduced the size of the mp3 or avi to the correct frame rate.
is there any other audio fomat suitable for flashmx2004 with lesser bytes.
View Replies !
View Related
Audio File In Flash-file Upload Problem
sir/mam,
i am doing web designing usingflash and no have to embed audio file into it. both mp3 and avi are too large for a flash file to upload.I have sound forge and have even reduced the size of the mp3 or avi to the correct frame rate.
is there any other audio fomat suitable for flashmx2004 with lesser bytes.
View Replies !
View Related
Flash 8 File Upload (file Types)
Hi,
I am usin ghte macromedia eg up upload files to a server, at the moment I can only upload images / docs as these are the specified file extensions, does any1 know how i can modify the following to allow for all files?
Code:
function uploadImage(event:Object):Void {
imageFile.browse([{description: "Image Files", extension: "*.doc;*.gif;*.png"}]);
}
thanks you
View Replies !
View Related
File Upload From Flash - Id.io
Hey everyone, just got a file uploader from flash finished.
Tell me what you think.
http://www.impulsedigital.com/idio/idio-v1/
There are still a few bugs in it, but overall works great.
Only works in IE (would be -really- easy to make work on Netscape...)
Only tested on a PC
Thanks,
Daniel Newman
impulse digital
View Replies !
View Related
Upload A File In Flash
I found someone that has made it work using ASP as a backend tool.
I wish to do the same but with PHP but I cannot convert the ASP code to PHP ... basically I dont understand it.
Can someone help me out and either guide me as to how to convert it or do it for me?
View Replies !
View Related
File Upload Through Flash?
I understand that I can use PHP to help me with this. However using flash, could I possibly create a button that will open the Open File Dialogue box, and send the filename path to PHP to upload? I could always use a popup window to allow me to do this, however through flash would be more convenient.
View Replies !
View Related
Flash File Upload
Hi,
I'm wondering if anyone knows if it is possible to upload a file to a server through flash. I would image it would take some server side scripting but, is there an actionscript version of the HTML <input type='File'> for the visitor to browse his or her hardrive?
Thanks
View Replies !
View Related
How To Upload File Using Flash
hi all,
I already know how to make a Browse button in Flash to browse the local directories. But say if someone selects a file to be uploaded to my server. I never want my user to have my password and username to upload the file via ftp, and i think no body will want this. So what would be the procedure to upload the file to my server
View Replies !
View Related
File Upload Using Flash & Asp
Hi,
I am making Program for uploading File on server Using Flash & ASP
when i use only asp the file is uploading Properly
But when i use the code with Flash it gives error
Request object error 'ASP 0206 : 80004005'
Cannot call BinaryRead
/test/fileupload/Loader.asp, line 28
Cannot call BinaryRead after using Request.Form collection.
i am attaching my two Asp File which I am using
Plesse help to over come this problam
View Replies !
View Related
Flash 8 File Upload
Flash 8 File Upload:
How could I receive some server side response?
For example, when my server script is finished with storing the file on the server, it will respond with a string giving me a custom message?
View Replies !
View Related
Flash+PHP File Upload
I know it has been mentioned on the forums but maybe I just need a fresh pair of eyes to see what I'm missing here. Im trying to upload files to my server using php. When I select the files in flash using the FileReferenceList class, all seems well as it looks like its uploading... I mean, I get the progress event traces and even get the "uploaded" trace from the Complete handler, but when I go to my server, the files aren't there! Im pulling my hair out on this one! Both the php file and the folder to house the images are on the same directory and chmod to 755.
Here's my AS3 and php codes. Please someone tell me what i'm doing wrong here.
AS3
ActionScript Code:
var fileRefList:FileReferenceList = new FileReferenceList();
fileRefList.addEventListener(Event.SELECT, selectHandler);
fileRefList.browse();
function selectHandler(event:Event):void
{
var request:URLRequest = new URLRequest("http://www.[mydomain].com/simple_upload.php");
var file:FileReference;
var files:FileReferenceList = FileReferenceList(event.target);
var selectedFileArray:Array = files.fileList;
for (var i:uint = 0; i < selectedFileArray.length; i++)
{
file = FileReference(selectedFileArray[i]);
file.addEventListener(Event.COMPLETE, completeHandler);
file.addEventListener(ProgressEvent.PROGRESS, progressHandler);
file.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
try
{
file.upload(request);
}
catch (error:Error)
{
trace("Unable to upload files.");
}
}
}
function completeHandler(event:Event):void
{
var file:FileReference = FileReference(event.target);
trace(file.name+" uploaded.");
}
function progressHandler(event:ProgressEvent):void {
var file:FileReference = FileReference(event.target);
trace("progressHandler: name = " + file.name + " bytesLoaded = " + event.bytesLoaded + " bytesTotal = " + event.bytesTotal);
}
function ioErrorHandler(event:IOErrorEvent):void {
trace("ioErrorHandler: " + event);
}
PHP
PHP Code:
<?php
$fileName = basename($_FILES["Filedata"]["name"]);
@move_uploaded_file($_FILES["Filedata"]["tmp_name"], "images/".$filename);
?>
View Replies !
View Related
File Upload Without Going To Flash 8?
I'd like to integrate a file upload capability (text box, browse button) to my flash movie. I can handle the file on the server side once it gets there, but other than going to flash 8, has anyone figured out a way to do it with MX 2004 Pro?
Thanks!
-- TC
(p.s. I REAAAAALLLY want to go to 8, just don't have the $ laying around as of yet)
View Replies !
View Related
Flash 8 File Upload Help
Right ok whats the deal with the flash 8 file upload facility?
it's not possible to check for any returned data?
-
Taking from Macromedia help file live comments:
Quote:
abuchkin said on Sep 18, 2005 at 11:26 PM :
Why there is no return value from the script page that file uploaded.
It's not sense to trust the true value of this function to make sure yourself about to file has uploaded.
What if your script is getting a file and saving it after inserting a database record and getting that ID to use as name and what if you need that ID from client side on flash.
link
Is this the case?
thanks
paul
View Replies !
View Related
Flash 8 File Upload .doc & .pdf Help, Please
I've been working with the file upload sample that came with Flash 8 as well
as other sources to help me figure this one out... like:
http://www.flash-db.com/Tutorials/upload/index.php
Everything I seem to find out about file uploading with Flash specifically
deals with images, but I need to upload .doc & .pdf files to attach to an
email as part of an employment application process for a site that is built
with Flash.
The back-end script is a simple ColdFusion file that I've tested (and works
fine with a static HTML test page):
<cffile action="upload"
destination = "ServerAddressHERE"
accept = "image/jpg, application/msword, application/pdf"
fileField = "Form.resumeFile"
nameConflict = "Overwrite">
The Flash example script that comes with Flash 8 has been modified as
follows:
System.security.allowDomain(" FQDN_here");
import flash.net.FileReference;
// The listener object listens for FileReference events.
var listener:Object = new Object();
// When the user selects a file, the onSelect() method is called, and
// passed a reference to the FileReference object.
listener.onSelect = function(selectedFile:FileReference):Void {
// Update the TextArea to notify the user that Flash is attempting to
// upload the image.
statusArea.text += "Attempting to upload " + selectedFile.name + "
";
// sample code provided by Flash
//
selectedFile.upload("
View Replies !
View Related
File Upload Using Flash 8.
No one seems to respond in the Flash 8 forum.. So here I am, please help thank you..
Does any body know how to get this dam code to upload video files as well. Every tut I come accross with Flash 8 upload is dealing with uploading images only ..HELP HELP HELP
Here is the PHPH Code.
<?php
$MAXIMUM_FILESIZE = 1024 * 200; // 200KB
$MAXIMUM_FILE_COUNT = 10; // keep maximum 10 files on server
echo exif_imagetype($_FILES['Filedata']);
if ($_FILES['Filedata']['size'] <= $MAXIMUM_FILESIZE) {
move_uploaded_file($_FILES['Filedata']['tmp_name'], "./temporary/".$_FILES['Filedata']['name']);
$type = exif_imagetype("./temporary/".$_FILES['Filedata']['name']);
if ($type == 1 || $type == 2 || $type == 3) {
rename("./temporary/".$_FILES['Filedata']['name'], "./images/".$_FILES['Filedata']['name']);
} else {
unlink("./temporary/".$_FILES['Filedata']['name']);
}
}
$directory = opendir('./images/');
$files = array();
while ($file = readdir($directory)) {
array_push($files, array('./images/'.$file, filectime('./images/'.$file)));
}
usort($files, sorter);
if (count($files) > $MAXIMUM_FILE_COUNT) {
$files_to_delete = array_splice($files, 0, count($files) - $MAXIMUM_FILE_COUNT);
for ($i = 0; $i < count($files_to_delete); $i++) {
unlink($files_to_delete[$i][0]);
}
}
print_r($files);
closedir($directory);
function sorter($a, $b) {
if ($a[1] == $b[1]) {
return 0;
} else {
return ($a[1] < $b[1]) ? -1 : 1;
}
}
?>
**************************************************
// Flash code from sample app in Flash 8..
//************************************************** **************************
//Copyright (C) 2005 Macromedia, Inc. All Rights Reserved.
//The following is Sample Code and is subject to all restrictions on
//such code as contained in the End User License Agreement accompanying
//this product.
//************************************************** **************************
System.security.allowDomain("http://www.helpexamples.com");
import flash.net.FileReference;
// The listener object listens for FileReference events.
var listener:Object = new Object();
// When the user selects a file, the onSelect() method is called, and
// passed a reference to the FileReference object.
listener.onSelect = function(selectedFile:FileReference):Void {
// Update the TextArea to notify the user that Flash is attempting to
// upload the image.
statusArea.text += "Attempting to upload " + selectedFile.name + "
";
// Upload the file to the PHP script on the server.
selectedFile.upload("upload.php");
};
// When the file begins to upload the onOpen() method is called, so
// notify the user that the file is starting to upload.
listener.onOpen = function(selectedFile:FileReference):Void {
statusArea.text += "Opening " + selectedFile.name + "
";
};
// Once the file has uploaded, the onComplete() method is called.
listener.onComplete = function(selectedFile:FileReference):Void {
// Notify the user that Flash is starting to download the image.
statusArea.text += "Downloading " + selectedFile.name + " to player
";
// Add the image to the ComboBox component.
imagesCb.addItem(selectedFile.name);
// Set the selected index of the ComboBox to that of the most recently-
// added image.
imagesCb.selectedIndex = imagesCb.length - 1;
// Call the custom downloadImage() function.
downloadImage();
};
var imageFile:FileReference = new FileReference();
imageFile.addListener(listener);
uploadBtn.addEventListener("click", uploadImage);
imagesCb.addEventListener("change", downloadImage);
imagePane.addEventListener("complete", imageDownloaded);
// If the image does not download, the event object's total property
// will equal -1. In that case, display a message to the user.
function imageDownloaded(event:Object):Void {
if(event.total == -1) {
imagePane.contentPath = "Message";
}
}
// When the user selects an image from the ComboBox, or when the downloadImage()
// function is called directly from the listener.onComplete() method,
// the downloadImage() functino sets the contentPath of the ScrollPane in order
// to start downloading the image to the player.
function downloadImage(event:Object):Void {
imagePane.contentPath = "images/" + imagesCb.value;
}
// When the user clicks the button Flash calls the uploadImage() function,
// and it opens a file browser dialog.
function uploadImage(event:Object):Void {
imageFile.browse([{description: "Media Files", extension: "*.mov;*.swf;*.jpg;*.gif;*.png"}]);
}
View Replies !
View Related
File Upload With Flash And Php
I have a big problem, oke i am made a simple php image hosting script and i want to make a flash banner that will have browse and upload functions..u know upload a file with flash, i made all of that and i found some tutorials on the internet but whenever i browse a image and press upload it opens my hosting page where it says taht i have to input a file firsth...so please can someone help me, what do i need to post(php source) pliz i am very thankfull to everyone that will at least try to help...plase i am desperate...once again thank you very much i know i am at the ridght place
View Replies !
View Related
Upload File Via Flash?
Hello, i am working on a website for a photographer. The photographer really has no experience with the web.
I would like to be able to have a page where the owner of the site can upload a new image.
so i can have an admin page, she can click 'upload photo', and it uploades the photo and updates my nav file (xml)
Does anyone know of any source codes for this? i have a decent understanding of xml. the part i am unsure of is how to upload the photo, then append the xml file with the new photo name.
i would like to use php for this. (if necessary)
Thanks for any help.
View Replies !
View Related
File Upload In Flash (5)
Hi,
I wonder if it's possible to do a file-upload in flash. The following HTML code does the trick but how to combine this with Flash?
<form enctype="multipart/form-data" action="form.php" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="512000">
Send this file: <input name="userfile" type="file">
<input type="submit" value="Send File">
</form>
TIA,
retrospect
View Replies !
View Related
Protecting A Flash File After Upload
can any body tell me plz that is there any way that when we made a flash file, then we made a procdure in that file, that after uploading a flash file it automatically generate an error, and close the file or display an message that this file has perform an illegal operation, and that massage will no disappear until or unless the administrator upload that file again.
http://flashsprinter.cjb.net
View Replies !
View Related
How To Upload Flash File Properly
simple question as far as uploading a flash site online. What do I do to set the path so the file can find the loadMovies online. Do I do it with the flas or can it be done from the ftp? the file is online at www.mkzero.com and the loadMovies do not show. thanks for your time
View Replies !
View Related
Flash Form - File Upload
Hi.
Ok. I am building a from so that users can send contact info to our email in box. I am using a flash php combo to send the var's to our email in box using post..this I have working. What I need help with is UPLOADING FILES.
I would like to have the user click a button that opens a dialog box, where they can choose a file of any type and have it uploaded to our server. Then I would like to have a link in the email created by the php for us to download the file.
This email will contain all the contact info entered and other notes typed by user with links to all the files that they uploaded
Does anyone know how to go about this. I am still not sure if flash can do this feature. Any would be greatly appreciated as I must get this application working soon. If you know where I can see a working sample or online tutorial or something along those lines, Thanks Mike.
View Replies !
View Related
Multiple File Upload With Flash/.php
Back again to get some more geniuses to help me out
Can someone get this upload tutorial to work?
http://www.codeproject.com/aspnet/FlashUpload.asp
I have tried, uploaded all the files, went though all the code to see if i had to change any destination paths (did't).
Every time i open Default.aspx in my browser and try to send a file it says "An error has ocured" and when i look in the script it says that this message will be displayed if a HTTP occurs. Anyone know how to fix this, or what i have or haven’t done?
I did change the permission of the Upload folder to 757.
---------------------------------
Just noticed that the permission on the Upload folder always goes back to 755. Could this be the problem? Will my host not allow me to do this? Or am i not even supost to do this?
Please someone help me
Thanks
SYS
View Replies !
View Related
Flash 8 File Upload With PERL
Hello,
I'm completely estatic about the new Flash 8 file upload handling. I have had great success using the new code w/ PHP and I know it works w/ ASP, JSP as well. I was looking to see if it also included PERL.
For example using this code:
listener.onSelect = function(selectedFile:FileReference):Void
{
statusArea.text = details.text = ""; //clean statusArea and details area
statusArea.text += "Attempting to upload " + selectedFile.name + "
"; // Flash is attempting to upload the image.
selectedFile.upload("upload.php"); // Upload the file to the PHP script on the server.
};
Could you substitue the line selectedFile.upload("upload.php"); w/ selectedFile.upload("upload.cgi");?
I'm still looking on the web for resources on this subject.
Thanks for your time.
Clem C
View Replies !
View Related
Flash 8 File Upload CPU Usage
I have a page that uses the FileReference object to upload a file to the server. Before uploading the file, the CPU usage is about 20-28%. Afterwards, however, the usage jumps to 100% and stays there. The only way to fix this that I have found is to let the browser crash (both IE and FireFox) or to close the browser. Anyone have any suggestions? I have tried setting my FRO to a new FRO.
View Replies !
View Related
How To Upload A File In Flash [renamed]
Im trying to make an application where the user will upload a file into a movie which has a layer on top of it? how would you do this???????
Im absolutely clueless~!!!
Im new to flash and am learning but any help would be class and I wil be for ever in your gratitude!!!!!!!!!
View Replies !
View Related
File Upload In Flash Form
Hi!!!
Im developing a flash form for a website, and i also need that after the viewers fill the form, they could also upload 2 photos. These 2 photos can't be bigger that 200k each... does anyone knows the AS to do this?? Can i do this in a flash form, or just in a html form?
I dont have any clue on this, so... any help would be great!!!!
thanks in advance!
cheers
View Replies !
View Related
Flash File Upload And Permissions
Does anyone know how to set permissions using php w/ a flash file upload system? The following is the base script I'm starting with (from a friends of ed book)
Thanks!
PHP Code:
<?php
//path to storage
$storage = './uploadedFiles';
//path name of file for storage
$uploadfile = "$storage/" . basename( $_FILES['Filedata']['name'] );
//if the file is moved successfully
if ( move_uploaded_file( $_FILES['Filedata']['tmp_name'] , $uploadfile ) ) {
echo( '1 ' . $_FILES['Filedata']['name']);
//file failed to move
}else{
echo( '0');
}
?>
View Replies !
View Related
File Upload/download With Flash
Hi,
Since Flash 8 FileReference API was introduced, and file upload/download through Flash finally became possible. The API has one troubling limitation though, which is the 100mb limit for file transfer.
I'm developing a browser based file transfer utility, and I would have wanted to implement it with solely Flash. It has to have the ability to manage far larger files than 100mb. Does anyone know a way to overcome this limitation, or have another solution for file upload/download through Flash 8?
Thanks already!
View Replies !
View Related
A File Upload Form In Flash
Hi
umm, well, I was just sitting & the idea struck.
Can a file upload form be made in Flash? Ok, simple forms have been made in Flash before but can the fuctionality of the <input type=file> be incorporated in a flash movie through some scripting or is there a component available?
Any ideas & comments are welcome(though there are restrictions on comments stating that I am selected for the Looney Tunes Show)
Solutions are more than welcome.
View Replies !
View Related
File Upload Flash Utility
I am looking for a web based file upload utility written in flash. The user would use the flash utility to select the file from their local harddrive that they would like to upload. The flash utility would then need to connect to a remote FTP server and upload the file.
Essentially I require something very similar to SWFUpload but one that uses FTP directly and does not require a server side language.
If anyone knows of something like this it would be much appreciated.
View Replies !
View Related
Upload File And Open Html From Flash?
Hi.
Could anybody help with uploading from flash?
At this moment i using HTML-page with:
<input type="file" name="photo_url">
If there is no possability, could i open html-page from flash with properties like java-code do:
javascript:var Win=window.open('bla.htm', '', resizable=yes,width=1024,height=720');
thanks a lot in advance.
View Replies !
View Related
|