Bring back polling but bump up timeout
- Polling is needed because status post requires the media to be done processing (not just uploaded) - But the default timeout set in masto.js is 3s, a bit too low if uploading a large video - Bumping up to 30s
This commit is contained in:
parent
9bc5340714
commit
5e687e871f
|
@ -144,6 +144,7 @@ export function App() {
|
|||
url: `https://${instanceURL}`,
|
||||
accessToken,
|
||||
disableVersionCheck: true,
|
||||
timeout: 30_000,
|
||||
});
|
||||
|
||||
const mastoAccount = await masto.accounts.verifyCredentials();
|
||||
|
@ -185,6 +186,7 @@ export function App() {
|
|||
url: `https://${instanceURL}`,
|
||||
accessToken,
|
||||
disableVersionCheck: true,
|
||||
timeout: 30_000,
|
||||
});
|
||||
setIsLoggedIn(true);
|
||||
} catch (e) {
|
||||
|
|
|
@ -542,7 +542,6 @@ function Compose({
|
|||
const params = {
|
||||
file,
|
||||
description,
|
||||
skipPolling: true,
|
||||
};
|
||||
return masto.mediaAttachments.create(params).then((res) => {
|
||||
if (res.id) {
|
||||
|
|
|
@ -29,6 +29,7 @@ if (window.opener) {
|
|||
url: `https://${instanceURL}`,
|
||||
accessToken,
|
||||
disableVersionCheck: true,
|
||||
timeout: 30_000,
|
||||
});
|
||||
console.info('Logged in successfully.');
|
||||
} catch (e) {
|
||||
|
|
Loading…
Reference in a new issue