jQuery HTML5 file drag and drop

前端 未结 3 1210
鱼传尺愫
鱼传尺愫 2021-01-31 21:09

I have looked at many scripts for uploading images to the server with AJAX with drag and drop. The scripts I found are not jQuery, are quite large and don\'t do exactly what I w

3条回答
  •  抹茶落季
    2021-01-31 21:50

    I found out that it's a bug in jQuery.1.8. This row should be before $('.dropzone').

    $.event.props.push('dataTransfer');
    

    Final HTML code

    
        
            
            
            
        
        
            
            
    Drop files here
    Drop files here

    PHP code in send_image.php

    
    
    
    '; ?>

提交回复
热议问题