FileReference upload on MAC

K, got a file uploader that doesnt work on mac, it browses fine, but then it transfers a lil bit, like about the size of the POST data and then just sits there, no bytesGetLoaded.

If neccessary i can let you try to upload to it, but it’s kinda invite only at this moment

a lil AS for ya:


[FONT=Courier New][LEFT][COLOR=#000000]**var**[/COLOR] listener:[COLOR=#0000FF]Object[/COLOR] = [COLOR=#000000]**new**[/COLOR] [COLOR=#0000FF]Object[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR];

listener.[COLOR=#0000FF]onSelect[/COLOR] = [COLOR=#000000]**function**[/COLOR][COLOR=#000000]([/COLOR]selectedFile:FileReference[COLOR=#000000])[/COLOR]:[COLOR=#0000FF]Void[/COLOR]  [COLOR=#000000]{[/COLOR]
    browse_mc.[COLOR=#000080]filename_txt[/COLOR].[COLOR=#0000FF]text[/COLOR] = selectedFile.[COLOR=#0000FF]name[/COLOR];
    [COLOR=#000000]**var**[/COLOR] good_fmt:[COLOR=#0000FF]TextFormat[/COLOR] = [COLOR=#000000]**new**[/COLOR] [COLOR=#0000FF]TextFormat[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR];
    good_fmt.[COLOR=#0000FF]color[/COLOR] = 0x666666;
    browse_mc.[COLOR=#000080]status_txt[/COLOR].[COLOR=#000080]size_txt[/COLOR].[COLOR=#0000FF]setNewTextFormat[/COLOR][COLOR=#000000]([/COLOR]good_fmt[COLOR=#000000])[/COLOR];
    [COLOR=#000000]**var**[/COLOR] newfilesizeInMb:[COLOR=#0000FF]Number[/COLOR] = [COLOR=#000000]([/COLOR]selectedFile.[COLOR=#0000FF]size[/COLOR]/[COLOR=#000080]1024[/COLOR][COLOR=#000000])[/COLOR]/[COLOR=#000080]1024[/COLOR];
    [COLOR=#000000]**var**[/COLOR] filesizeInMb:[COLOR=#0000FF]Number[/COLOR] = [COLOR=#0000FF]int[/COLOR][COLOR=#000000]([/COLOR]newfilesizeInMb*[COLOR=#000080]100[/COLOR][COLOR=#000000])[/COLOR]/[COLOR=#000080]100[/COLOR];
    browse_mc.[COLOR=#000080]status_txt[/COLOR].[COLOR=#000080]size_txt[/COLOR].[COLOR=#0000FF]text[/COLOR] = filesizeInMb+[COLOR=#FF0000]" mb"[/COLOR];
    browse_mc.[COLOR=#000080]status_txt[/COLOR].[COLOR=#000080]type_txt[/COLOR].[COLOR=#0000FF]text[/COLOR] = selectedFile.[COLOR=#0000FF]type[/COLOR];
    [COLOR=#000000]**var**[/COLOR] dateText:[COLOR=#0000FF]String[/COLOR] = [COLOR=#0000FF]String[/COLOR][COLOR=#000000]([/COLOR]selectedFile.[COLOR=#000080]modificationDate[/COLOR][COLOR=#000000])[/COLOR];
    [COLOR=#000000]**var**[/COLOR] strippedDate:[COLOR=#0000FF]Array[/COLOR] = dateText.[COLOR=#0000FF]split[/COLOR][COLOR=#000000]([/COLOR]dateText.[COLOR=#0000FF]substring[/COLOR][COLOR=#000000]([/COLOR]dateText.[COLOR=#000080]length[/COLOR]-[COLOR=#000080]13[/COLOR], dateText.[COLOR=#000080]length[/COLOR]-[COLOR=#000080]5[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000])[/COLOR];
    browse_mc.[COLOR=#000080]status_txt[/COLOR].[COLOR=#000080]modified_txt[/COLOR].[COLOR=#0000FF]text[/COLOR] = strippedDate[COLOR=#000000][[/COLOR][COLOR=#000080]0[/COLOR][COLOR=#000000]][/COLOR]+strippedDate[COLOR=#000000][[/COLOR][COLOR=#000080]1[/COLOR][COLOR=#000000]][/COLOR];
    browse_mc.[COLOR=#000080]status_txt[/COLOR].[COLOR=#000080]alpha_tween[/COLOR] = [COLOR=#000000]**new**[/COLOR] Tween[COLOR=#000000]([/COLOR]browse_mc.[COLOR=#000080]status_txt[/COLOR], [COLOR=#FF0000]"_alpha"[/COLOR], Regular.[COLOR=#000080]easeInOut[/COLOR], browse_mc.[COLOR=#000080]status_txt[/COLOR].[COLOR=#0000FF]_alpha[/COLOR], [COLOR=#000080]100[/COLOR], .[COLOR=#000080]33[/COLOR], [COLOR=#000000]**true**[/COLOR][COLOR=#000000])[/COLOR];
    browse_mc.[COLOR=#000080]status_txt[/COLOR].[COLOR=#000080]alpha_tween[/COLOR].[COLOR=#000080]onMotionFinished[/COLOR] = [COLOR=#000000]**function**[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]
        [COLOR=#0000FF]if[/COLOR] [COLOR=#000000]([/COLOR]filesizeInMb<=[COLOR=#000080]100[/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]
            browse_mc.[COLOR=#000080]status_txt[/COLOR].[COLOR=#000080]main_error_txt[/COLOR].[COLOR=#0000FF]text[/COLOR] = [COLOR=#FF0000]""[/COLOR];
            browse_mc.[COLOR=#000080]upload_but[/COLOR].[COLOR=#000080]alpha_tween[/COLOR] = [COLOR=#000000]**new**[/COLOR] Tween[COLOR=#000000]([/COLOR]browse_mc.[COLOR=#000080]upload_but[/COLOR], [COLOR=#FF0000]"_alpha"[/COLOR], Regular.[COLOR=#000080]easeInOut[/COLOR], browse_mc.[COLOR=#000080]upload_but[/COLOR].[COLOR=#0000FF]_alpha[/COLOR], [COLOR=#000080]100[/COLOR], .[COLOR=#000080]33[/COLOR], [COLOR=#000000]**true**[/COLOR][COLOR=#000000])[/COLOR];
            browse_mc.[COLOR=#000080]upload_but[/COLOR].[COLOR=#000080]alpha_tween[/COLOR].[COLOR=#000080]onMotionFinished[/COLOR] = [COLOR=#000000]**function**[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]
                browse_mc.[COLOR=#000080]upload_but[/COLOR].[COLOR=#0000FF]onRelease[/COLOR] = [COLOR=#000000]**function**[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]
                    browse_mc.[COLOR=#000080]upload_but[/COLOR].[COLOR=#0000FF]enabled[/COLOR] = [COLOR=#000000]**false**[/COLOR];
                    browse_mc.[COLOR=#000080]browse_but[/COLOR].[COLOR=#0000FF]enabled[/COLOR] = [COLOR=#000000]**false**[/COLOR];
                    status_mc.[COLOR=#000080]alpha_tween[/COLOR] = [COLOR=#000000]**new**[/COLOR] Tween[COLOR=#000000]([/COLOR]status_mc, [COLOR=#FF0000]"_alpha"[/COLOR], Regular.[COLOR=#000080]easeInOut[/COLOR], status_mc.[COLOR=#0000FF]_alpha[/COLOR], [COLOR=#000080]100[/COLOR], .[COLOR=#000080]33[/COLOR], [COLOR=#000000]**true**[/COLOR][COLOR=#000000])[/COLOR];
                    status_mc.[COLOR=#000080]alpha_tween[/COLOR].[COLOR=#000080]onMotionFinished[/COLOR] = [COLOR=#000000]**function**[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]
                        selectedFile.[COLOR=#000080]upload[/COLOR][COLOR=#000000]([/COLOR][COLOR=#FF0000]"http://72.47.197.19/dev_AA_Video_Contest/php/uploadVideo.php?id="[/COLOR]+[COLOR=#000000]**_global**[/COLOR].[COLOR=#000080]user_id[/COLOR]+[COLOR=#FF0000]"&videoTitle="[/COLOR]+[COLOR=#000000]**_global**[/COLOR].[COLOR=#000080]videoTitle[/COLOR]+[COLOR=#FF0000]"&videoCategory="[/COLOR]+[COLOR=#000000]**_global**[/COLOR].[COLOR=#000080]videoCategory[/COLOR]+[COLOR=#FF0000]"&videoDescription="[/COLOR]+[COLOR=#000000]**_global**[/COLOR].[COLOR=#000080]videoDescription[/COLOR]+[COLOR=#FF0000]"&videoKeywords="[/COLOR]+[COLOR=#000000]**_global**[/COLOR].[COLOR=#000080]videoKeywords[/COLOR]+[COLOR=#FF0000]"&this=end"[/COLOR][COLOR=#000000])[/COLOR];
                    [COLOR=#000000]}[/COLOR];
                [COLOR=#000000]}[/COLOR];
            [COLOR=#000000]}[/COLOR];
        [COLOR=#000000]}[/COLOR] [COLOR=#0000FF]else[/COLOR] [COLOR=#000000]{[/COLOR]
            [COLOR=#000000]**var**[/COLOR] error_fmt:[COLOR=#0000FF]TextFormat[/COLOR] = [COLOR=#000000]**new**[/COLOR] [COLOR=#0000FF]TextFormat[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR];
            error_fmt.[COLOR=#0000FF]color[/COLOR] = 0xff0000;
            browse_mc.[COLOR=#000080]status_txt[/COLOR].[COLOR=#000080]size_txt[/COLOR].[COLOR=#0000FF]setNewTextFormat[/COLOR][COLOR=#000000]([/COLOR]error_fmt[COLOR=#000000])[/COLOR];
            browse_mc.[COLOR=#000080]status_txt[/COLOR].[COLOR=#000080]size_txt[/COLOR].[COLOR=#0000FF]text[/COLOR] = filesizeInMb+[COLOR=#FF0000]" mb"[/COLOR];
            browse_mc.[COLOR=#000080]status_txt[/COLOR].[COLOR=#000080]main_error_txt[/COLOR].[COLOR=#0000FF]text[/COLOR] = [COLOR=#FF0000]"The file is too large, chose another or modify your clip to be smaller."[/COLOR];
            browse_mc.[COLOR=#000080]upload_but[/COLOR].[COLOR=#000080]tweenDown[/COLOR] = [COLOR=#000000]**new**[/COLOR] Tween[COLOR=#000000]([/COLOR]browse_mc.[COLOR=#000080]upload_but[/COLOR], [COLOR=#FF0000]"_alpha"[/COLOR], Regular.[COLOR=#000080]easeInOut[/COLOR], browse_mc.[COLOR=#000080]upload_but[/COLOR].[COLOR=#0000FF]_alpha[/COLOR], [COLOR=#000080]25[/COLOR], .[COLOR=#000080]33[/COLOR], [COLOR=#000000]**true**[/COLOR][COLOR=#000000])[/COLOR];
            browse_mc.[COLOR=#000080]upload_but[/COLOR].[COLOR=#0000FF]enabled[/COLOR] = [COLOR=#000000]**false**[/COLOR];
        [COLOR=#000000]}[/COLOR]
    [COLOR=#000000]}[/COLOR];
[COLOR=#000000]}[/COLOR];

listener.[COLOR=#000080]onOpen[/COLOR] = [COLOR=#000000]**function**[/COLOR][COLOR=#000000]([/COLOR]selectedFile:FileReference[COLOR=#000000])[/COLOR]:[COLOR=#0000FF]Void[/COLOR]  [COLOR=#000000]{[/COLOR]
    browse_mc.[COLOR=#000080]upload_but[/COLOR].[COLOR=#000080]tweenDown[/COLOR] = [COLOR=#000000]**new**[/COLOR] Tween[COLOR=#000000]([/COLOR]browse_mc.[COLOR=#000080]upload_but[/COLOR], [COLOR=#FF0000]"_alpha"[/COLOR], Regular.[COLOR=#000080]easeInOut[/COLOR], browse_mc.[COLOR=#000080]upload_but[/COLOR].[COLOR=#0000FF]_alpha[/COLOR], [COLOR=#000080]25[/COLOR], .[COLOR=#000080]33[/COLOR], [COLOR=#000000]**true**[/COLOR][COLOR=#000000])[/COLOR];
    [COLOR=#000000]**var**[/COLOR] newfilesizeInMb:[COLOR=#0000FF]Number[/COLOR] = [COLOR=#000000]([/COLOR]selectedFile.[COLOR=#0000FF]size[/COLOR]/[COLOR=#000080]1024[/COLOR][COLOR=#000000])[/COLOR]/[COLOR=#000080]1024[/COLOR];
    [COLOR=#000000]**var**[/COLOR] filesizeInMb:[COLOR=#0000FF]Number[/COLOR] = [COLOR=#0000FF]int[/COLOR][COLOR=#000000]([/COLOR]newfilesizeInMb*[COLOR=#000080]100[/COLOR][COLOR=#000000])[/COLOR]/[COLOR=#000080]100[/COLOR];
    status_mc.[COLOR=#000080]status_txt[/COLOR].[COLOR=#0000FF]text[/COLOR] = [COLOR=#FF0000]"Uploading..."[/COLOR];
    status_mc.[COLOR=#000080]videoTitle_txt[/COLOR].[COLOR=#0000FF]text[/COLOR] = [COLOR=#000000]**_global**[/COLOR].[COLOR=#000080]videoTitle[/COLOR];
    status_mc.[COLOR=#000080]totalSize_txt[/COLOR].[COLOR=#0000FF]text[/COLOR] = filesizeInMb+[COLOR=#FF0000]" mb"[/COLOR];
    status_mc.[COLOR=#000080]filename_txt[/COLOR].[COLOR=#0000FF]text[/COLOR] = selectedFile.[COLOR=#0000FF]name[/COLOR];
    status_mc.[COLOR=#000080]cancel_but[/COLOR].[COLOR=#0000FF]enabled[/COLOR] = [COLOR=#000000]**true**[/COLOR];
    status_mc.[COLOR=#000080]cancel_but[/COLOR].[COLOR=#0000FF]onRelease[/COLOR] = [COLOR=#000000]**function**[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]
        selectedFile.[COLOR=#000080]cancel[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR];
        status_mc.[COLOR=#000080]status_txt[/COLOR].[COLOR=#0000FF]text[/COLOR] = [COLOR=#FF0000]"Cancelled."[/COLOR];
        status_mc.[COLOR=#000080]cancel_but[/COLOR].[COLOR=#0000FF]onRelease[/COLOR] = [COLOR=#0000FF]Void[/COLOR];
        status_mc.[COLOR=#000080]alpha_tween[/COLOR] = [COLOR=#000000]**new**[/COLOR] Tween[COLOR=#000000]([/COLOR]status_mc, [COLOR=#FF0000]"_alpha"[/COLOR], Regular.[COLOR=#000080]easeInOut[/COLOR], status_mc.[COLOR=#0000FF]_alpha[/COLOR], [COLOR=#000080]25[/COLOR], .[COLOR=#000080]33[/COLOR], [COLOR=#000000]**true**[/COLOR][COLOR=#000000])[/COLOR];
        browse_mc.[COLOR=#000080]upload_but[/COLOR].[COLOR=#000080]tweenDown[/COLOR] = [COLOR=#000000]**new**[/COLOR] Tween[COLOR=#000000]([/COLOR]browse_mc.[COLOR=#000080]upload_but[/COLOR], [COLOR=#FF0000]"_alpha"[/COLOR], Regular.[COLOR=#000080]easeInOut[/COLOR], browse_mc.[COLOR=#000080]upload_but[/COLOR].[COLOR=#0000FF]_alpha[/COLOR], [COLOR=#000080]100[/COLOR], .[COLOR=#000080]33[/COLOR], [COLOR=#000000]**true**[/COLOR][COLOR=#000000])[/COLOR];
        browse_mc.[COLOR=#000080]upload_but[/COLOR].[COLOR=#0000FF]enabled[/COLOR] = [COLOR=#000000]**true**[/COLOR];
        browse_mc.[COLOR=#000080]browse_but[/COLOR].[COLOR=#0000FF]enabled[/COLOR] = [COLOR=#000000]**true**[/COLOR];
        status_mc.[COLOR=#000080]progressBar_mc[/COLOR].[COLOR=#0000FF]_xscale[/COLOR] = [COLOR=#000080]0[/COLOR];
        status_mc.[COLOR=#000080]percent_txt[/COLOR].[COLOR=#0000FF]text[/COLOR] = [COLOR=#FF0000]"0%"[/COLOR];
        status_mc.[COLOR=#000080]amountUploaded_txt[/COLOR].[COLOR=#0000FF]text[/COLOR] = [COLOR=#FF0000]""[/COLOR];
        status_mc.[COLOR=#000080]totalSize_txt[/COLOR].[COLOR=#0000FF]text[/COLOR] = [COLOR=#FF0000]""[/COLOR];
        status_mc.[COLOR=#000080]filename_txt[/COLOR].[COLOR=#0000FF]text[/COLOR] = [COLOR=#FF0000]""[/COLOR];
    [COLOR=#000000]}[/COLOR];
[COLOR=#000000]}[/COLOR];

listener.[COLOR=#000080]onProgress[/COLOR] = [COLOR=#000000]**function**[/COLOR][COLOR=#000000]([/COLOR]selectedFile:FileReference, [COLOR=#0000FF]bytesLoaded[/COLOR]:[COLOR=#0000FF]Number[/COLOR], [COLOR=#0000FF]bytesTotal[/COLOR]:[COLOR=#0000FF]Number[/COLOR][COLOR=#000000])[/COLOR]:[COLOR=#0000FF]Void[/COLOR]  [COLOR=#000000]{[/COLOR]
    [COLOR=#000000]**var**[/COLOR] pctLoaded:[COLOR=#0000FF]Number[/COLOR] = [COLOR=#0000FF]Math[/COLOR].[COLOR=#0000FF]round[/COLOR][COLOR=#000000]([/COLOR][COLOR=#0000FF]bytesLoaded[/COLOR]/[COLOR=#0000FF]bytesTotal[/COLOR]*[COLOR=#000080]100[/COLOR][COLOR=#000000])[/COLOR];
    [COLOR=#000000]**var**[/COLOR] newfilesizeInMb:[COLOR=#0000FF]Number[/COLOR] = [COLOR=#000000]([/COLOR][COLOR=#0000FF]bytesLoaded[/COLOR]/[COLOR=#000080]1024[/COLOR][COLOR=#000000])[/COLOR]/[COLOR=#000080]1024[/COLOR];
    [COLOR=#000000]**var**[/COLOR] filesizeInMb:[COLOR=#0000FF]Number[/COLOR] = [COLOR=#0000FF]int[/COLOR][COLOR=#000000]([/COLOR]newfilesizeInMb*[COLOR=#000080]100[/COLOR][COLOR=#000000])[/COLOR]/[COLOR=#000080]100[/COLOR];
    status_mc.[COLOR=#000080]progressBar_mc[/COLOR].[COLOR=#0000FF]_xscale[/COLOR] = pctLoaded;
    status_mc.[COLOR=#000080]percent_txt[/COLOR].[COLOR=#0000FF]text[/COLOR] = pctLoaded+[COLOR=#FF0000]"%"[/COLOR];
    status_mc.[COLOR=#000080]amountUploaded_txt[/COLOR].[COLOR=#0000FF]text[/COLOR] = filesizeInMb+[COLOR=#FF0000]" mb"[/COLOR];
[COLOR=#000000]}[/COLOR];
upload_error.[COLOR=#0000FF]text[/COLOR] = [COLOR=#FF0000]"test"[/COLOR]

listener.[COLOR=#000080]onHTTPError[/COLOR] = [COLOR=#000000]**function**[/COLOR][COLOR=#000000]([/COLOR]file:FileReference, [COLOR=#0000FF]error[/COLOR]:[COLOR=#0000FF]Number[/COLOR][COLOR=#000000])[/COLOR]:[COLOR=#0000FF]Void[/COLOR] [COLOR=#000000]{[/COLOR]
    upload_error.[COLOR=#0000FF]text[/COLOR] = [COLOR=#FF0000]"HTTPerror: "[/COLOR]+[COLOR=#0000FF]error[/COLOR];
[COLOR=#000000]}[/COLOR]

listener.[COLOR=#000080]onIOError[/COLOR] = [COLOR=#000000]**function**[/COLOR][COLOR=#000000]([/COLOR]file:FileReference[COLOR=#000000])[/COLOR]:[COLOR=#0000FF]Void[/COLOR] [COLOR=#000000]{[/COLOR]
    upload_error.[COLOR=#0000FF]text[/COLOR] = [COLOR=#FF0000]"IOerror"[/COLOR]
[COLOR=#000000]}[/COLOR]

listener.[COLOR=#000080]onSecurityError[/COLOR] = [COLOR=#000000]**function**[/COLOR][COLOR=#000000]([/COLOR]file:FileReference, errorString:[COLOR=#0000FF]String[/COLOR][COLOR=#000000])[/COLOR]:[COLOR=#0000FF]Void[/COLOR] [COLOR=#000000]{[/COLOR]
    upload_error.[COLOR=#0000FF]text[/COLOR] = [COLOR=#FF0000]"SecurityError: "[/COLOR]+errorString
[COLOR=#000000]}[/COLOR]

listener.[COLOR=#000080]onComplete[/COLOR] = [COLOR=#000000]**function**[/COLOR][COLOR=#000000]([/COLOR]selectedFile:FileReference[COLOR=#000000])[/COLOR]:[COLOR=#0000FF]Void[/COLOR]  [COLOR=#000000]{[/COLOR]
    status_mc.[COLOR=#000080]status_txt[/COLOR].[COLOR=#0000FF]text[/COLOR] = [COLOR=#FF0000]"Complete."[/COLOR];
    site_gl_obj.[COLOR=#000080]rootRef[/COLOR].[COLOR=#000080]goSection_fn[/COLOR][COLOR=#000000]([/COLOR][COLOR=#FF0000]"step4"[/COLOR][COLOR=#000000])[/COLOR];
[COLOR=#000000]}[/COLOR];

[COLOR=#000000]**var**[/COLOR] videoFile:FileReference = [COLOR=#000000]**new**[/COLOR] FileReference[COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR];
videoFile.[COLOR=#0000FF]addListener[/COLOR][COLOR=#000000]([/COLOR]listener[COLOR=#000000])[/COLOR];

browse_mc.[COLOR=#000080]browse_but[/COLOR].[COLOR=#0000FF]onRelease[/COLOR] = [COLOR=#000000]**function**[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]
    uploadImage[COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR];
[COLOR=#000000]}[/COLOR];

[COLOR=#000000]**function**[/COLOR] uploadImage[COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]
    videoFile.[COLOR=#000080]browse[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000][[/COLOR][COLOR=#000000]{[/COLOR]description:[COLOR=#FF0000]"Video Clips"[/COLOR], extension:[COLOR=#FF0000]"*.mov;*.mpg;*.mpeg;*.avi;*.wmv;*.flv"[/COLOR][COLOR=#000000]}[/COLOR][COLOR=#000000]][/COLOR][COLOR=#000000])[/COLOR];
[COLOR=#000000]}[/COLOR]
[/LEFT]
[/FONT]


and some php:


<?php

    //UPLOAD AND MOVE VIDEO FILE//////////////////////////////////////////////////////////////////////////
    
    $target_path = 'a path';
    $previousFileName = basename( $_FILES['Filedata']['name']);
    $full_path = $target_path . $previousFileName;
    $filename = "default.avi";
    if(preg_match("/.mpg/i", "$full_path")){
        $filename = time() . ".mpg";
    }
    if (preg_match("/.mpeg/i", "$full_path")){
        $filename = time() . ".mpeg";
    }
    if(preg_match("/.avi/i", "$full_path")){
        $filename = time() . ".avi";
    }
    if(preg_match("/.mov/i", "$full_path")){
        $filename = time() . ".mov";
    }
    if(preg_match("/.wmv/i", "$full_path")){
        $filename = time() . ".wmv";
    }
    if(preg_match("/.flv/i", "$full_path")){
        $filename = time() . ".flv";
    }
    $target_path = $target_path . $filename;
    if(move_uploaded_file($_FILES['Filedata']['tmp_name'], $target_path)){\
        require_once('wickedMadConnectionScriptFromHell.php');
        
        $userId = $_GET['id'];
        $videoTitle = $_GET['videoTitle'];
        
        $videoCategory = $_GET['videoCategory'];
        $videoDescription = $_GET['videoDescription'];
        $videoKeywords = $_GET['videoKeywords'];
        
        $insertSQL = "INSERT INTO AwesomeLesbianVideos (userId, title, category, description, keywords, fileName, previousFileName, dateAdded) VALUES ('$userId', '$videoTitle', '$videoCategory', '$videoDescription', '$videoKeywords', '$filename', '$previousFileName' , NOW())";
        
        mysql_select_db($database_Unikron_MT, $Unikron_MT);
        $Result1 = mysql_query($insertSQL, $Unikron_MT) or die(mysql_error());
    
    }
    
    
?>