UNPKG

@aws-amplify/storage

Version:

Storage category of aws-amplify

22 lines (20 loc) 938 B
'use strict'; // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 Object.defineProperty(exports, "__esModule", { value: true }); exports.uploadData = uploadData; const readFile_1 = require("../utils/readFile"); const toBase64_1 = require("../utils/toBase64"); const uploadData_1 = require("../../providers/s3/apis/internal/uploadData"); function uploadData(ctx, input) { // The internal uploadData returns an UploadTask which has pause/resume. On // the server path we intentionally hide pause/resume from the type because // they are not supported across isolated server requests. The runtime // object still exposes them as no-ops (delegated to createUploadTask). return (0, uploadData_1.uploadData)({ amplify: ctx, readFile: readFile_1.readFile, toBase64: toBase64_1.toBase64, }, input); } //# sourceMappingURL=uploadData.js.map