projects
/
roojs1
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fd8c5b1
)
Roo/dialog/UploadCropbox.js
author
leon
<leon@roojs.com>
Tue, 12 Jul 2022 04:25:37 +0000
(12:25 +0800)
committer
leon
<leon@roojs.com>
Tue, 12 Jul 2022 04:25:37 +0000
(12:25 +0800)
Roo/dialog/UploadCropbox.js
patch
|
blob
|
history
diff --git
a/Roo/dialog/UploadCropbox.js
b/Roo/dialog/UploadCropbox.js
index
c2cfd23
..
fdd86be
100644
(file)
--- a/
Roo/dialog/UploadCropbox.js
+++ b/
Roo/dialog/UploadCropbox.js
@@
-1310,13
+1310,6
@@
Roo.extend(Roo.dialog.UploadCropbox, Roo.Component, {
console.log("cropType: " + this.cropType);
console.log("cropType: " + this.cropType);
- var outputFileType = 'image/jpeg';
-
- if(typeof(file.type) != 'undefined') {
- console.log(file.type);
- outputFileType = file.type;
- }
-
if(crop){
formData.append('crop', crop);
var blobBin = atob(crop.split(',')[1]);
if(crop){
formData.append('crop', crop);
var blobBin = atob(crop.split(',')[1]);
@@
-1324,7
+1317,7
@@
Roo.extend(Roo.dialog.UploadCropbox, Roo.Component, {
for(var i = 0; i < blobBin.length; i++) {
array.push(blobBin.charCodeAt(i));
}
for(var i = 0; i < blobBin.length; i++) {
array.push(blobBin.charCodeAt(i));
}
- var croppedFile =new Blob([new Uint8Array(array)], {type:
outputFile
Type});
+ var croppedFile =new Blob([new Uint8Array(array)], {type:
this.crop
Type});
formData.append(this.paramName, croppedFile, file.name);
}
formData.append(this.paramName, croppedFile, file.name);
}