yjryu / KERIS star
류윤주 류윤주 2023-12-07
231207 이세현 썸네일 오류 수정
@46dd59adfc59049f1d5946de850c8202026b56ea
client/views/pages/admin/news/NewsInsert.vue
--- client/views/pages/admin/news/NewsInsert.vue
+++ client/views/pages/admin/news/NewsInsert.vue
@@ -268,6 +268,7 @@
                         if (img.width < MIN_WIDTH || img.height < MIN_HEIGHT) {
                             alert("썸네일 이미지 크기는 최소 " + MIN_WIDTH + "픽셀" + "x" + MIN_HEIGHT + "픽셀" + "입니다.");
                             this.thumbnailPreview = null;
+                            this.$refs.thumbnailInput.value = ''
                         }
                         // // Continue adding the thumbnail to the fileList
                         // this.fileList.push(fileItem);
client/views/pages/admin/news/NewsUpdate.vue
--- client/views/pages/admin/news/NewsUpdate.vue
+++ client/views/pages/admin/news/NewsUpdate.vue
@@ -354,6 +354,7 @@
                         if (img.width < MIN_WIDTH || img.height < MIN_HEIGHT) {
                             alert("썸네일 이미지 크기는 최소 " + MIN_WIDTH + "픽셀" + "x" + MIN_HEIGHT + "픽셀" + "입니다.");
                             this.thumbnailPreview = originalThumbnail;
+                            this.$refs.thumbnailInput.value = ''
                         } else {
                             this.deleteFileList.push(...this.oldThumbnailFileList.filter(file => file.file_ty === 'thumbnail'));
                             this.deleteCount += 1;
client/views/pages/admin/technology/TechInsert.vue
--- client/views/pages/admin/technology/TechInsert.vue
+++ client/views/pages/admin/technology/TechInsert.vue
@@ -321,6 +321,7 @@
                         if (img.width < MIN_WIDTH || img.height < MIN_HEIGHT) {
                             alert("썸네일 이미지 크기는 최소 " + MIN_WIDTH + "픽셀" + "x" + MIN_HEIGHT + "픽셀" + "입니다.");
                             this.thumbnailPreview = null;
+                            this.$refs.thumbnailInput.value = ''
                         }
                         // // Continue adding the thumbnail to the fileList
                         // this.fileList.push(fileItem);
client/views/pages/admin/technology/TechUpdate.vue
--- client/views/pages/admin/technology/TechUpdate.vue
+++ client/views/pages/admin/technology/TechUpdate.vue
@@ -452,14 +452,6 @@
                     const originalThumbnail = this.thumbnailPreview;
                     this.thumbnailPreview = e.target.result;
 
-                    // 파일 확장자 검사
-                    const fileExtension = file.name.split('.').pop().toLowerCase();
-                    if (fileExtension === 'jpg') {
-                        alert("JPG, PNG, BMP, GIF, WBMP 확장자파일만 사용하실 수 있습니다.");
-                        this.thumbnailPreview = originalThumbnail;
-                        return;
-                    }
-
                     // 이미지크기 확인
                     const img = new Image();
                     img.src = this.thumbnailPreview;
@@ -467,6 +459,7 @@
                         if (img.width < MIN_WIDTH || img.height < MIN_HEIGHT) {
                             alert("썸네일 이미지 크기는 최소 " + MIN_WIDTH + "픽셀" + "x" + MIN_HEIGHT + "픽셀" + "입니다.");
                             this.thumbnailPreview = originalThumbnail;
+                            this.$refs.thumbnailInput.value = ''
                         } else {
                             this.deleteFileList.push(...this.oldThumbnailFileList.filter(file => file.file_ty === 'thumbnail'));
                             this.deleteCount += 1;
Add a comment
List