@seafile/comment-editor 0.0.1-alpha.80 → 0.0.1-alpha.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -44,7 +44,6 @@ const InsertElementDialog = _ref => {
|
|
|
44
44
|
const uploadLocalVideoInputRef = (0, _react.useRef)();
|
|
45
45
|
const onFileChanged = (0, _react.useCallback)(event => {
|
|
46
46
|
const imgInfos = (0, _helpers.generateImageInfos)(event.target.files);
|
|
47
|
-
console.log('imgInfos', imgInfos);
|
|
48
47
|
(0, _helpers.insertImage)(validEditor, imgInfos, validEditor.selection, insertPosition);
|
|
49
48
|
if (uploadLocalImageInputRef.current) {
|
|
50
49
|
uploadLocalImageInputRef.current.value = '';
|
|
@@ -316,7 +316,6 @@ const isImageUrlIsFromUpload = url => {
|
|
|
316
316
|
};
|
|
317
317
|
exports.isImageUrlIsFromUpload = isImageUrlIsFromUpload;
|
|
318
318
|
const generateImageInfos = files => {
|
|
319
|
-
console.log('files', files);
|
|
320
319
|
const newFiles = Array.from(files);
|
|
321
320
|
const imgInfos = newFiles.filter(item => {
|
|
322
321
|
if (item && !item.type.startsWith('image/')) return false;
|
|
@@ -43,6 +43,7 @@ const useUploadImage = _ref => {
|
|
|
43
43
|
try {
|
|
44
44
|
const fileItem = _imageCache.default.getImage(file_uuid);
|
|
45
45
|
const imageUrl = await _context.default.api.uploadLocalImage([fileItem]);
|
|
46
|
+
console.log('imageUrl', imageUrl);
|
|
46
47
|
if (imageUrl && imageUrl[0]) {
|
|
47
48
|
updateImageNode(editor, element, imageUrl[0]);
|
|
48
49
|
}
|