Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/puter-js/src/modules/FileSystem/operations/upload.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import path from '../../../lib/path.js';
import * as utils from '../../../lib/utils.js';
import getAbsolutePathForApp from '../utils/getAbsolutePathForApp.js';
import { showUsageLimitDialog } from '../../../modules/UsageLimitDialog.js';
import getAbsolutePathForApp from '../utils/getAbsolutePathForApp.js';

/* eslint-disable */
const MAX_THUMBNAIL_BYTES = 2 * 1024 * 1024;
Expand All @@ -13,6 +13,7 @@ const SIGNED_BATCH_CHUNK_PIPELINE_CONCURRENCY = 4;
const SIGNED_BATCH_FILE_UPLOAD_CONCURRENCY = 8;
const SIGNED_MULTIPART_PART_UPLOAD_CONCURRENCY = 8;
const SIGNED_BATCH_WRITE_UNAVAILABLE_STATUSES = new Set([404, 405, 501]);
const SIGNED_BATCH_SUPPORTED_ENVS = ['web', 'gui', 'app'];

const isLikelyImageFile = (file) => {
if ( ! file ) return false;
Expand Down Expand Up @@ -605,6 +606,7 @@ const upload = async function (items, dirPath, options = {}) {


const shouldAttemptSignedBatchWrite = (
SIGNED_BATCH_SUPPORTED_ENVS.includes(puter.env) &&
!options.shortcutTo &&
(files.length > 0 || signedDirectories.length > 0) &&
signedBatchWriteAllowed
Expand Down
Loading