움직이는 webp 이미지 업로드 가능하도록 수정중

This commit is contained in:
kagla
2021-06-25 14:03:45 +09:00
parent 8ac1d25242
commit bd33a31a10
3 changed files with 21 additions and 13 deletions

View File

@ -55,13 +55,13 @@
<!-- The Iframe Transport is required for browsers without support for XHR file uploads -->
<script src="./js/jquery.iframe-transport.js"></script>
<script type="text/javascript" src="./swfupload/swfupload.js"></script>
<script type="text/javascript" src="./swfupload/jquery.swfupload.js"></script>
<script type="text/javascript" src="./swfupload/swfupload.js?v=210625-1329"></script>
<script type="text/javascript" src="./swfupload/jquery.swfupload.js?v=210625-1329"></script>
<!-- The basic File Upload plugin -->
<script src="./js/jquery.fileupload.js?v=140715"></script>
<script src="./js/jquery.fileupload.js?v=210625-1329"></script>
<script src="./js/basic.js?v3"></script>
<script src="./js/basic.js?v=210625-1329"></script>
</body>
</html>

View File

@ -1092,7 +1092,7 @@ class UploadHandler
//throw new Exception("Invalid image MIME type");
return false;
}
$image_from_file = self::$MIME_TYPES_PROCESSORS[$mime_type][0];
$image_to_file = self::$MIME_TYPES_PROCESSORS[$mime_type][1];
@ -1101,7 +1101,7 @@ class UploadHandler
// https://stackoverflow.com/questions/61394477/php-e-error-gd-webp-cannot-allocate-temporary-buffer
// 움직이는 webp 이미지나 큰사이즈의 webp 이미지에 대한 해결 방안은 아직 없는 것 같다
$reprocessed_image = @$image_from_file($file_path);
// error_log("\$image_from_file = '$image_from_file', \$image_to_file = '$image_to_file', \$reprocessed_image = '$reprocessed_image' ");
// error_log("\$image_from_file = '$image_from_file', \$image_to_file = '$image_to_file', \$reprocessed_image = '$reprocessed_image', \$file_path ='$file_path' ");
if (!$reprocessed_image) {
//throw new Exception("Unable to create reprocessed image from file");