-
Notifications
You must be signed in to change notification settings - Fork 55
fix: add timeout to client request in convertScratchToXbp function #3090
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ import { client } from './common' | |
| import { humanizeFileSize } from '@/utils/utils' | ||
|
|
||
| const maxFileSize = 32 * 1024 * 1024 // 32MB | ||
| const convertTimeout = 60 * 1000 // 60s | ||
|
nighca marked this conversation as resolved.
|
||
|
|
||
| /** | ||
| * Convert Scratch project (.sb2/.sb3) to XBuilder project (.xbp) via backend `/scratch-convert` endpoint. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The JSDoc (line 9 in the new file) says the endpoint is Also, the comment
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @xgopilot Draft a pull request to
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. SummaryFixed the JSDoc comment in
Permission RequiredHi @nighca! I've prepared the changes but need permission to push to the fork. View Details & SolutionTarget: Push blocked: Recommended Solution: Install GitHub App
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
@xgopilot Push it to a temporary branch for
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Created PR #3092 with the JSDoc fixes for
@go-wyvern can cherry-pick or copy the change from that PR into the |
||
|
|
@@ -21,6 +22,6 @@ export async function convertScratchToXbp(file: File, signal?: AbortSignal) { | |
| const form = new FormData() | ||
| form.append('file', file, file.name) | ||
|
|
||
| const blob = await client.postBinary('/util/sb2xbp', form, { signal }) | ||
| const blob = await client.postBinary('/util/sb2xbp', form, { signal, timeout: convertTimeout }) | ||
| return blob as Blob | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.