1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-12-02 22:49:09 +02:00

All: Allow attaching files of unknown mime type

This commit is contained in:
Laurent Cozic
2017-12-01 23:15:49 +00:00
parent aef2e4845d
commit dbeff4fd7d
8 changed files with 29 additions and 67 deletions

View File

@@ -13,26 +13,6 @@ function shimInit() {
return shim.fetchWithRetry(() => {
return shim.nativeFetch_(url, options)
}, options);
// if (!options) options = {};
// if (!options.timeout) options.timeout = 1000 * 120; // ms
// if (!('maxRetry' in options)) options.maxRetry = 5;
// let retryCount = 0;
// while (true) {
// try {
// const response = await nodeFetch(url, options);
// return response;
// } catch (error) {
// if (fetchRequestCanBeRetried(error)) {
// retryCount++;
// if (retryCount > options.maxRetry) throw error;
// await time.sleep(retryCount * 3);
// } else {
// throw error;
// }
// }
// }
}
shim.fetchBlob = async function(url, options) {