Skip to content

Commit

Permalink
disable image cropper due to blurry images
Browse files Browse the repository at this point in the history
  • Loading branch information
abhi12299 committed Jan 17, 2021
1 parent 369d770 commit ff4ed80
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions components/dashboard/UploadMediaButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,22 +65,23 @@ export default {
switch (type) {
case 'image-svg':
case 'image-gif':
this.upload(file, this.filename)
break
case 'image':
let url
if (URL) {
url = URL.createObjectURL(file)
this.imageBlob = url
} else if (FileReader) {
const reader = new FileReader()
reader.onload = function(e) {
url = reader.result
this.imageBlob = url
}
reader.readAsDataURL(file)
}
this.upload(file, this.filename)
break
// case 'image':
// let url
// if (URL) {
// url = URL.createObjectURL(file)
// this.imageBlob = url
// } else if (FileReader) {
// const reader = new FileReader()
// reader.onload = function(e) {
// url = reader.result
// this.imageBlob = url
// }
// reader.readAsDataURL(file)
// }
// break
case 'video':
const fileSizeInMB = file.size * 1e-6
if (fileSizeInMB >= 20) {
Expand Down

0 comments on commit ff4ed80

Please sign in to comment.