summaryrefslogtreecommitdiffstats
path: root/client/components/main/editor.js
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2020-05-25 17:54:51 +0300
committerLauri Ojansivu <x@xet7.org>2020-05-25 17:54:51 +0300
commitd52affe65893f17bab59bb43aa9f5afbb54993d3 (patch)
tree82b88066d4fb8efb6610ed77177d3747d34f0480 /client/components/main/editor.js
parent23dcd084a49de4e6568527d8f97ed25adb04dafd (diff)
downloadwekan-d52affe65893f17bab59bb43aa9f5afbb54993d3.tar.gz
wekan-d52affe65893f17bab59bb43aa9f5afbb54993d3.tar.bz2
wekan-d52affe65893f17bab59bb43aa9f5afbb54993d3.zip
Move In Progress ostrio-files changes to separate branch, and revert ostrio-files changes, so that:
- Export to CSV/TSV with custom fields works - Attachments are not exported to disk - It is possible to build arm64/s390x versions again. Thanks to xet7 ! Related #3110
Diffstat (limited to 'client/components/main/editor.js')
-rwxr-xr-xclient/components/main/editor.js50
1 files changed, 26 insertions, 24 deletions
diff --git a/client/components/main/editor.js b/client/components/main/editor.js
index abe4160f..0c2e3186 100755
--- a/client/components/main/editor.js
+++ b/client/components/main/editor.js
@@ -152,31 +152,33 @@ Template.editor.onRendered(() => {
const processData = function(fileObj) {
Utils.processUploadedAttachment(
currentCard,
- fileObj,
- { onUploaded:
- attachment => {
- if (attachment && attachment._id && attachment.isImage) {
- attachment.one('uploaded', function() {
- const maxTry = 3;
- const checkItvl = 500;
- let retry = 0;
- const checkUrl = function() {
- // even though uploaded event fired, attachment.url() is still null somehow //TODO
- const url = Attachments.link(attachment, 'original', '/');
- if (url) {
- insertImage(
- `${location.protocol}//${location.host}${url}`,
- );
- } else {
- retry++;
- if (retry < maxTry) {
- setTimeout(checkUrl, checkItvl);
- }
+ fileObj,
+ attachment => {
+ if (
+ attachment &&
+ attachment._id &&
+ attachment.isImage()
+ ) {
+ attachment.one('uploaded', function() {
+ const maxTry = 3;
+ const checkItvl = 500;
+ let retry = 0;
+ const checkUrl = function() {
+ // even though uploaded event fired, attachment.url() is still null somehow //TODO
+ const url = attachment.url();
+ if (url) {
+ insertImage(
+ `${location.protocol}//${location.host}${url}`,
+ );
+ } else {
+ retry++;
+ if (retry < maxTry) {
+ setTimeout(checkUrl, checkItvl);
}
- };
- checkUrl();
- });
- }
+ }
+ };
+ checkUrl();
+ });
}
},
);