fancyupload

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    fancyupload

    Here are a fancy uploader

    Uploading other file types

    Harald Kirschner and others have pointed out that all files that are parsed using any flash uploader are of the MIME type “application/octet-stream”, which makes it useless to identify and authorize a particular file type. Hence at present a usable hack is based on checking the file extension. Replace your existing script.php with this one and modify the third line to suit your needs. If your server has MIME magic in PHP installed, I would recommend using the following to extract the MIME information:
    Code:
    $f = finfo_open(FILEINFO_MIME);
    $mime = finfo_file($f, $_FILES[’Filedata’][’tmp_name’]);
    finfo_close($f);
    Changing the files that are displayed with “Browse Only…”

    Go to index.php and modify the line:
    Code:
    swiffy.browse({'Images (*.jpg, *.jpeg, *.gif, *.png)':
    ‘*.jpg; *.jpeg; *.gif; *.png’})
    I noted that for example if you want to find pdfs only, you can change it to:

    swiffy.browse({'Files (*.pdf)': '*.pdf'})
    What I modified

    I added the following lines to script.php, which allows your files to be *actually* uploaded to a folder, in this case uploadedfiles/, which should be created inside the directory that contains the upload script.
    Code:
    move_uploaded_file($_FILES[’photoupload’][’tmp_name’], “./uploadedfiles/”.$_FILES[’photoupload’][’name’]);
    chmod(”./uploadedfiles/”.$_FILES[’photoupload’][’name’], 0777);
    Attached Files
    ________________
    Jacques
    jacques@gw-designs.co.za
    http://coding.biz.tm
    Come join and lets make it a place to learn all the noobies how to code
    __________________

    NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

    #2
    Thx riderz see u have been bussy.
    My site: http://mimobifunclub.tk
    sigpic

    Comment

    Working...
    X