Upload ZIP file for screenshots

Ok, I’m unsure how to do this so could someone please explain how i would create a screenshot bit where for example on CodeCanyon, you upload a .zip file which contains screenshots and then when u go to view the item the screenshots have been extracted and are shown in a lightbox etc

What sort of tools do i need to achieve this?

Thanks

<form id="post_screen">

                                <input name="screenshots[]" multiple="multiple" type="file">
                                <button type="submit" class="ui fluid black button"><i class="cloud upload alternate icon"></i>Upload</button>
                        
                            <script type="text/javascript">
                                $(document).ready(function (e) {
                                    $("#post_screen").on('submit',(function(e) {
                                        e.preventDefault();
                                        $.ajax({
                                            url: "ajax-image-upload.php",
                                            type: "POST",
                                            data: new FormData(this),
                                            contentType: false,
                                            cache: false,
                                            processData:false,
                                            beforeSend: function() 
                                        {
                                            $("#post-s").html('<div class="ui divider"></div><i class="notched circle loading icon"></i>');
                                        },  
                                        success: function(response)
                                        {
                                            $("#post-s").html(response);
                                        }        
                                       });
                                    }));
                                });
                            </script>
                            <div id="post-s"></div>
                        </form>

PHP has built-in ZIP functionality

http://php.net/manual/en/book.zip.php

so just extract the files to an directory and have your gallery show the files.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.