最近の検索
最近の検索はありません

avdnowhere
参加日2021年10月16日
·
前回のアクティビティ2023年12月27日
フォロー中
0
フォロワー
0
合計アクティビティ
4
投票
0
受信登録
2
アクティビティの概要
バッジ
記事
投稿
コミュニティへのコメント
記事へのコメント
アクティビティの概要
さんの最近のアクティビティ avdnowhere
avdnowhereさんが投稿を作成しました:
Hi everyone,
I have an attachment on internal note and I want to fetch it from my custom app.
I was trying to use comment.attachments() to get the attachment file from the comment, however it doesn't return the real File, it's just return the details of the attached file (like filename, contentType, contentUrl, thumbnailUrl, and token).
So I am thinking to create a new File by making a new blob from attachment.contentUrl(), but I can't get it due to CORS error when I am trying to get the attached file using the fetch function.
This is my code:
this.ticketObj = await parentClient.get('ticket')
const attachmentObject = this.ticketObj.ticket.comment.attachments
const blobFile = await fetch(attachmentObject[0].contentUrl).then(r => r.blob()) // I got CORS error on this line
const uploadFile = new File([blobFile], attachmentObject[0].filename, { type: attachmentObject[0].contentType })
投稿日時:2021年5月27日 · avdnowhere
0
フォロワー
3
投票
1
コメント
avdnowhereさんが投稿を作成しました:
Hi everyone,
I was trying to use comment.attachments() to get the attachment file from the comment, however it doesn't return the real File, it's just return the details of the attached file.
So I am thinking to create a new File by making a new blob file from attachment.contentUrl(), but I can't get it since I got CORS error when I am trying to get it using the fetch function.
This is my code:
投稿日時:2021年5月25日 · avdnowhere
0
フォロワー
3
投票
1
コメント