www.webdeveloper.com
Results 1 to 3 of 3

Thread: autimatic create folder

  1. #1
    Join Date
    Apr 2013
    Posts
    1

    Question autimatic create folder

    Hi all
    sorry to bother you guys) i am not a web developer, but i need some help in php.
    I have downloaded script, which is doing multiple file uploads.

    I need to change it: i want to make a new folder for each new multiple upload. It can be created by user, or it can be created by using date and time. So folder name will be user_yyyy_mm_dd_HH-MM-SS.

    Is it simple task? can anyone help with it please)


    here is index.php
    PHP Code:
    <!DOCTYPE>
    <
    html>
    <
    head>
    <
    meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <
    title>Image upload</title>
    <
    link href='http://fonts.googleapis.com/css?family=Boogaloo' rel='stylesheet' type='text/css'>
    <
    script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
    <script type="text/javascript" src="js/multiupload.js"></script>
    <script type="text/javascript">
    var config = {
        support : "image/jpg,image/png,image/bmp,image/jpeg,image/gif,image/tiff,image/raw,image/html,image/pdf",        // Valid file formats
        form: "demoFiler",                    // Form ID
        dragArea: "dragAndDropFiles",        // Upload Area ID
        uploadUrl: "upload.php"                // Server side upload url
    }
    $(document).ready(function(){
        initMultiUploader(config);
    });
    </script>
    <link href="css/style.css" type="text/css" rel="stylesheet" />
    </head>
    <body lang="en">
    <center><h1 class="title">Multiple Drag and Drop File Upload</h1></center>
    <div id="dragAndDropFiles" class="uploadArea">
        <h1>Drop Images Here</h1>
    </div>
    <form name="demoFiler" id="demoFiler" enctype="multipart/form-data">
    <input type="file" name="multiUpload" id="multiUpload" multiple />
    <input type="submit" name="submitHandler" id="submitHandler" value="Upload" class="buttonUpload" />
    </form>
    <div class="progressBar">
        <div class="status"></div>
    </div>
    </body>
    </html> 
    here is upload.php
    PHP Code:
    <?php

    if($_SERVER['REQUEST_METHOD'] == "POST"){
        if(
    move_uploaded_file($_FILES['file']['tmp_name'], "uploads/".$_FILES['file']['name'])){
            echo(
    $_POST['index']);
        }
        exit;
    }
    ?>

    and one more question. how to allow to upload any file?
    I understant it is here:
    var config = {
    support : "image/jpg,image/png,image/bmp,image/jpeg,image/gif,image/tiff,image/raw,image/html,image/pdf", // Valid file formats

    but what should I add?

    Thank you for your help
    V.

  2. #2
    Join Date
    Apr 2013
    Posts
    31
    Hi, I am not a web developer, either. But I wonder whether some professional image processors can help with it? You can google it and have a try. I hope you success. Good luck.



    Best regards,
    Arron

  3. #3
    Join Date
    May 2004
    Location
    chennai, tamil nadu, India
    Posts
    451
    Quote Originally Posted by vladzilla View Post
    and one more question. how to allow to upload any file?
    I understant it is here:
    var config = {
    support : "image/jpg,image/png,image/bmp,image/jpeg,image/gif,image/tiff,image/raw,image/html,image/pdf", // Valid file formats

    but what should I add?

    Thank you for your help
    V.


    Try this http://webdesign.about.com/od/multim...-extension.htm

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles