Friday, March 19, 2010

jquery ajax uploader with progres bar

I implement the jquery  ajax uploader, you find all the details better at here,
 I get many problem when I use it,

For implement in php
script type="text/javascript" src='js/jquery-1.4.min.js'>
    <script src="js/swfupload.js"></script>
    <script src="js/jquery-asyncUpload-0.1.js"></script>

    $(function() {
            upload_url: "../test1.php", // Important! This isn't a directory, it's a HANDLER such as an ASP.NET MVC action method, or a PHP file, or a Classic ASP file, or an ASP.NET .ASHX handler. The handler should save the file to disk (or database).
            flash_url: 'js/swfupload.swf',  
            file_size_limit: '1024 MB',
            button_image_url: 'js/blankButton.png'
DIV.ProgressBar { width: 100px; padding: 0; border: 1px solid black; margin-right: 1em; height:.75em; margin-left:1em; display:-moz-inline-stack; display:inline-block; zoom:1; *display:inline; }
DIV.ProgressBar DIV { background-color: Green; font-size: 1pt; height:100%; float:left; }
SPAN.asyncUploader OBJECT { position: relative; top: 5px; left: 10px; }
<input type="file" id="yourID" name="yourID" />
code for php

 require_once 'system/config/configure.php';    
    $con = mysql_connect(DB_SERVER,DB_USERNAME,DB_PASSWORD);
         echo "ok";
          $uploaddir = VIDEO_IMG_FULL_PATH;
move_uploaded_file($_FILES['Filedata']['tmp_name'], $uploadfile)

No comments:

Post a Comment