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
pull/13/head
Lim Chee Aun 2022-12-20 13:29:38 +08:00
rodzic 9bc5340714
commit 5e687e871f
3 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -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) {

Wyświetl plik

@ -542,7 +542,6 @@ function Compose({
const params = {
file,
description,
skipPolling: true,
};
return masto.mediaAttachments.create(params).then((res) => {
if (res.id) {

Wyświetl plik

@ -29,6 +29,7 @@ if (window.opener) {
url: `https://${instanceURL}`,
accessToken,
disableVersionCheck: true,
timeout: 30_000,
});
console.info('Logged in successfully.');
} catch (e) {