Watch 2 Star 2 Fork 0

Cocolait / html5-make-upload-thumbJavaScript

Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Without author's permission, this code is only for learning and cannot be used for other purposes.
手机端上传图片 spread retract

Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

使用说明:

<script src="jquery-3.0.0.min.js"></script> <script src="layer_mobile/layer.js"></script> <script src="binaryajax.js"></script> <script src="exif.js"></script> <script src="megapix-image.js"></script> <script src="jquery.make-thumb.js"></script>
    var $form = $('#j-form');
    var $file = $('#j-file');
    var $status = $('.j-status');
    $file.makeThumb({
        width: 400,
        height: 400,
//        mark: {padding: 5, src: 'mark.png', width: 30, height: 30},
        success: function(dataURL, tSize, file, sSize, fEvt) {
            // post data
            var $up = $('<input type="hidden" name="base64">');
            $up.insertAfter($file).val(dataURL);
            $file.remove();
            var load = layer.open({type: 2,content: '上传中'});
            $.ajax({
                url: "api.php",
                data: $form.serialize(),
                method: "POST",
                async : true,
                dataType : "json",
                success: function (data) {
                    layer.close(load);
                    $("#ret").html(data.msg);
                    console.log(data);
                }

            });
//            $form.submit();
        }
    });

//源插件地址 https://github.com/kairyou/html5-make-thumb

Comments ( 0 )

Sign in for post a comment

JavaScript
1
https://gitee.com/cp.net/html5-make-upload-thumb.git
git@gitee.com:cp.net/html5-make-upload-thumb.git
cp.net
html5-make-upload-thumb
html5-make-upload-thumb
master

Search

231008 48f1a665 1899542 231017 9a6720c6 1899542