• Hi my sugestion from upload photo and zip.. my code example:

    <!DOCTYPE html>
    <html>
    <head>
    	<title>PHP - Multiple upload using dropzone.js</title>
      <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous">
      <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/dropzone/5.2.0/dropzone.css">
    	<script src="https://cdnjs.cloudflare.com/ajax/libs/dropzone/5.2.0/dropzone.js" charset="utf-8"></script>
    </head>
    <body>
    
    <div class="container">
    	<div class="row">
    		<div class="col-md-12">
    			<h2>PHP - Multiple upload using dropzone.js</h2>
    			<form action="upload.php" enctype="multipart/form-data" class="dropzone" id="image-upload">
    				<div>
    					<h3>Upload Multiple By Click On Box</h3>
    				</div>
    			</form>
    		</div>
    	</div>
    </div>
    
    <script type="text/javascript">
    	Dropzone.options.imageUpload = {
            maxFilesize:100,
            acceptedFiles: ".jpeg,.jpg,.png,.gif,.zip"
        };
    </script>
    <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js" integrity="sha384-vFJXuSJphROIrBnz7yo7oB41mKfc8JzQZiCq4NCceLEaO4IHwicKwpJf9c9IpFgh" crossorigin="anonymous"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js" integrity="sha384-alpBpkh1PFOepccYVYDB4do5UnbKysX5WZXm3XxPqe5iKTfUKjNkCk9SaVuEZflJ" crossorigin="anonymous"></script>
    </body>
    </html>
    

    upload.php:

    <?php
    
    $uploadDir = 'uploads';
    
    if (!empty($_FILES)) {
     $tmpFile = $_FILES['file']['tmp_name'];
     $filename = $uploadDir.'/'. $_FILES['file']['name'];
     move_uploaded_file($tmpFile,$filename);
    }
    

    How to integrate in the script your?

    Library dropzone.js open source https://www.dropzonejs.com/

    Integrate the system in wppa photo album from “Upload”?

    Thanks. my elementar english, i’am italian.

Viewing 1 replies (of 1 total)
  • Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Instead of move_uploaded_file( $tmpFile, $filename );,
    you can use wppa_do_frontend_file_upload( $tmpFile, $album );

    Note1: the album id $album must be known and the user must have the rights to upload to the album.

    Note2: a .zip file must be placed in the users ‘depot’:

    
    move_uploaded_file( $tmpFile, WPPA_DEPOT_PATH . '/' . basename( $filename ) );

    and it should be processed on the Photo Albums -> Import Photos admin page.

Viewing 1 replies (of 1 total)
  • The topic ‘How to multiple photo one one’ is closed to new replies.