mirror of
https://github.com/wekan/wekan.git
synced 2025-12-20 17:30:13 +01:00
Attachment upload from card done, need to fix download link
This commit is contained in:
parent
05c53ca01d
commit
4dcdec0084
9 changed files with 49 additions and 27 deletions
|
|
@ -229,18 +229,14 @@ Template.editor.onRendered(() => {
|
|||
currentCard,
|
||||
fileObj,
|
||||
attachment => {
|
||||
if (
|
||||
attachment &&
|
||||
attachment._id &&
|
||||
attachment.isImage()
|
||||
) {
|
||||
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();
|
||||
const url = attachment.link();
|
||||
if (url) {
|
||||
insertImage(
|
||||
`${location.protocol}//${location.host}${url}`,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue