Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ファイルのサイズが大きくて送れないときにエラーを表示する #3933

Closed
mehm8128 opened this issue May 5, 2023 · 2 comments · Fixed by #4049
Closed
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@mehm8128
Copy link
Contributor

mehm8128 commented May 5, 2023

現状何も起こらずに送信だけできない状態らしい

const postAttachment = async (file: File) => {
if (isPosting.value) return
isPosting.value = true
const attachmentFile = await getResizedFile(file)
const { data } = await apis.postFile(attachmentFile, props.channelId, {
/**
* https://github.com/axios/axios#request-config
*/
onUploadProgress(e: ProgressEvent) {
progress.value = e.loaded / e.total
}
})

@mehm8128 mehm8128 added the enhancement New feature or request label May 5, 2023
@sapphi-red
Copy link
Contributor

@mehm8128
Copy link
Contributor Author

編集時:↑で引用したところでawait getResizedFile(file)などをtryに入れてcatchしたら上手くいった(現状だとエラー表示は何もなく操作ができない状態で止まってしまう)
投稿時:

でif文の条件満たしてなくて実行されてなさそう(if文外したらエラートーストが表示された)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
3 participants