{"id":155288,"date":"2023-12-18T14:44:07","date_gmt":"2023-12-18T05:44:07","guid":{"rendered":"https:\/\/support.questetra.com\/?p=155288"},"modified":"2023-12-18T14:44:09","modified_gmt":"2023-12-18T05:44:09","slug":"service-task-aws-s3-file-upload","status":"publish","type":"post","link":"https:\/\/support.questetra.com\/en\/bpmn-icons\/service-task-aws-s3-file-upload\/","title":{"rendered":"Amazon S3: Upload File"},"content":{"rendered":"\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"58\" data-attachment-id=\"113160\" data-permalink=\"https:\/\/support.questetra.com\/en\/developer-blog\/how-to-use-timer-start-event\/attachment\/advanced-banner-new-en\/\" data-orig-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2021\/05\/advanced-banner-new-en.png?fit=1200%2C68&amp;ssl=1\" data-orig-size=\"1200,68\" data-comments-opened=\"0\" data-image-title=\"advanced-banner-new-en\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2021\/05\/advanced-banner-new-en.png?fit=1024%2C58&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2021\/05\/advanced-banner-new-en-1024x58.png?resize=1024%2C58&#038;ssl=1\" alt=\"\" class=\"wp-image-113160\" srcset=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2021\/05\/advanced-banner-new-en.png?resize=1024%2C58&amp;ssl=1 1024w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2021\/05\/advanced-banner-new-en.png?resize=600%2C34&amp;ssl=1 600w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2021\/05\/advanced-banner-new-en.png?resize=768%2C44&amp;ssl=1 768w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2021\/05\/advanced-banner-new-en.png?w=1200&amp;ssl=1 1200w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading has-border-color has-product-main-border-color has-white-color has-product-main-background-color has-text-color has-background has-link-color\" style=\"border-width:2px;margin-top:0;margin-right:0;margin-bottom:0;margin-left:0;padding-top:var(--wp--preset--spacing--10);padding-right:var(--wp--preset--spacing--20);padding-bottom:var(--wp--preset--spacing--10);padding-left:var(--wp--preset--spacing--20)\"><strong>Amazon S3: Upload File<\/strong><\/h4>\n\n\n\n<p class=\"has-text-align-right has-border-color has-product-main-border-color has-white-color has-product-main-background-color has-text-color has-background has-link-color has-small-font-size mt-0 pt-0 wp-block-paragraph\" style=\"border-width:2px;margin-top:0;margin-right:0;margin-bottom:0;margin-left:0;padding-top:0;padding-right:var(--wp--preset--spacing--20);padding-bottom:0;padding-left:var(--wp--preset--spacing--20)\"><a href=\"https:\/\/support.questetra.com\/en\/bpmn-icons\/service-task-aws-s3-file-upload\/\">Amazon S3: \u30d5\u30a1\u30a4\u30eb\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9<\/a><\/p>\n\n\n\n<p class=\"has-border-color has-product-main-border-color has-text-color has-white-background-color has-background has-link-color mt-0 pt-0 wp-block-paragraph\" style=\"border-width:2px;margin-top:0;margin-right:0;margin-bottom:var(--wp--preset--spacing--30);margin-left:0;padding-top:var(--wp--preset--spacing--20);padding-right:var(--wp--preset--spacing--20);padding-bottom:var(--wp--preset--spacing--20);padding-left:var(--wp--preset--spacing--20)\">This item uploads files to the specified folder on Amazon S3.<\/p>\n\n\n\n<div class=\"wp-block-coblocks-accordion\">\n<div class=\"wp-block-coblocks-accordion-item\"><details open><summary class=\"wp-block-coblocks-accordion-item__title\">Basic Configs<\/summary><div class=\"wp-block-coblocks-accordion-item__content\">\n<dl style=\"0 0 -0.7em 0\">\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #C3C3C3;\"><\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">Step Name<\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #C3C3C3;\"><\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">Note<\/dd>\n<\/dl>\n<\/div><\/details><\/div>\n<\/div>\n\n\n\n<figure class=\"wp-block-image alignright has-custom-border is-style-default\"><img decoding=\"async\" src=\"data:image;base64,\n        iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAABE9JREFUWEfN\n        l3tMlWUcxz\/v4SCXA38gtyPTiXo2m8YdEp3cUzGxOdw0E5tRNqlsMDGlRRE5kFJjqUDLKEJsYuCN\n        xD8qA5oMGeBhXpIdbiuRrORSkOKBt71vHuIcDnRU2un5893v8nl\/z\/f3e55HwMpLsDS\/V1CQo6Pe\n        MR6EKBECAG\/A5b5\/D9AhQBOI5weVg+VdDQ2DlsT+VwDvBZFqpXJkpyiwFbC3JChwRxAp0OsVOR1X\n        v+uezGdSgLl+YVtB2CuAysLERmYiDICY2qatKZjIf0IAjX9EniiKSQ+T2NRHEIR83aWql83FMgug\n        8Q8vEUWenYrkhhiCwFHdpeqN4+BMP0zln1tSCaMKSHsuIORP5Z+bxhIRk8ZqYhRAUrvCdkT3sIKz\n        FFoS5sg9hcbQHaMAGt\/wD0SBZEsDPYqdIJKra65OkWLIANKQcdCrfjPt85zMXcTGRGCjtGFo6B6f\n        lRwnfMkibv58i2073ubwwRw8Pdx4bUcGcbHRrIlbQfnpc2xcvwZnJxV37w6Rd7iYwuJSU947fyoH\n        XKVhJQNo\/MISRIRiU6uQQF96evvRtXXw8YE9eKk9adG147NwPum79\/Hum9txUqnI2nuQVSuiUXu6\n        09f\/OwqFgoQtycya6SWH\/PGnrnEFExA36bQ1R+4DhH8iQqKp1aJgf57bsJaZXmpEUcTe3o6S0lO8\n        tHkDpScqeGp5FPrhYWrrGglbEkJ9YzNKpZLVK2PQtXVypvJrjpVXMDAwfioLUKjTVr8gA8zzC2\/k\n        7\/k+uubMnkVBbha9fX18efIsq2JjUHu48Xp6Nvuz07n1y69Ms53GjZvduLtNZ4bak4MfFVF2upLl\n        0WGsfXoli58I5JuqC6SkZZqTTFOrtjrQAHB7zMEiG0vO72Wmcb6mls+\/KCd3z1s4ONjz4qs72ZWS\n        xJLQICrOfUvXzW6eT1jHja5unkncxrKopVy+2iLrpCh\/H38MDLA5KdUcQE+rtnq6AUA0Z7E7PZWV\n        yyLR6\/VcbNDi4e5Kbl4hPgvmy1tTeKSU1vZOMtJSqG\/UytU58P47LF0cwjRbW2739PJhwaccP3nW\n        bNO0aquFSQEepdUs8R0LMG4LUrdtoa5BS82Fi5bEMrKRxCkJVaqYnZ0dZacqydp3yDSO0RaME6HU\n        AW9sf0Uuf+mJr2Q1P8haHx\/HDLUHi4IDaL58jez9eabu\/4hQ42e+DVUqRzJ2JbMseinDwyNcu66j\n        SXuFKz+0UFNbP9pekl3Y4hCCA3zxffwx5s2ZTW9fP8fKzrDiyQhZB1Xf1xkBGLXhRIPI4KGZ603i\n        pnVEhoXi6uKCjY3CbDGkyXdd1yYnlioWvzoWZ2cVRUfLJh9EE41ic1mkaRcaEoC\/z0KcVI6yia69\n        k+strXLLWriMR7HkZNXDSAKw+nEsQVj1QjIquCm8jJrqwdzl9P93Kf0vKvHA13IDhFUfJgYIqz7N\n        xorIao9TCyfbQ5v9BWbg5jDAzldXAAAAAElFTkSuQmCC\n    \" alt=\"Auto Step icon\" class=\"has-border-color has-ast-global-color-4-border-color\" style=\"border-width:0.5em\"\/><\/figure>\n\n\n\n<div class=\"wp-block-coblocks-accordion\">\n<div class=\"wp-block-coblocks-accordion-item\"><details open><summary class=\"wp-block-coblocks-accordion-item__title\">Configs for this Auto Step<\/summary><div class=\"wp-block-coblocks-accordion-item__content\">\n<dl style=\"0 0 -0.7em 0\">\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">conf_AccessKey<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">C1: Access Key<span style=\"color:#990000;\"> *<\/span><\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">conf_SecretKey<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">C2: Secret Access Key<span style=\"color:#990000;\"> *<\/span><\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">conf_Region<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">C3: Region Code<span style=\"color:#990000;\"> *<\/span><\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">conf_Bucket<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">C4: Bucket Name<span style=\"color:#990000;\"> *<\/span><\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">conf_Prefix<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">C5: Object Key Prefix<\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">conf_Files<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">C6: Data item whose attached files will be uploaded<span style=\"color:#990000;\"> *<\/span><\/dd>\n\n<\/dl>\n<\/div><\/details><\/div>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"margin-top:var(--wp--preset--spacing--30)\"><span>Notes<\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>To learn about how to create your Access Key and Secret Access Key, see the\u00a0<a href=\"https:\/\/docs.aws.amazon.com\/IAM\/latest\/UserGuide\/id_credentials_access-keys.html\" target=\"_blank\" rel=\"noreferrer noopener\">Amazon Web Services Documentation<\/a><\/li>\n\n\n\n<li>If [C5: Object Key Prefix] or a file name includes &#8220;\/&#8221;, S3 interprets the character string before &#8220;\/&#8221; as a folder name\n<ul class=\"wp-block-list\">\n<li>For example, if you have entered &#8220;folder1\/&#8221; to [C5: Object Key Prefix], then the files will be uploaded to a folder named &#8220;folder1&#8221;<\/li>\n\n\n\n<li>For more details, please refer to <a href=\"https:\/\/docs.aws.amazon.com\/AmazonS3\/latest\/userguide\/object-keys.html\" target=\"_blank\" rel=\"noreferrer noopener\">Amazon Web Services Documentation<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"margin-top:var(--wp--preset--spacing--30)\"><span>Capture<\/span><\/h3>\n\n\n\n<figure class=\"wp-block-image size-full has-custom-border is-style-rounded is-style-rounded--1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1412\" height=\"1446\" data-attachment-id=\"155289\" data-permalink=\"https:\/\/support.questetra.com\/en\/incident\/trouble-20240124\/attachment\/aws-s3-file-upload_capture_en\/\" data-orig-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/12\/aws-s3-file-upload_capture_en.png?fit=1412%2C1446&amp;ssl=1\" data-orig-size=\"1412,1446\" data-comments-opened=\"0\" data-image-title=\"aws-s3-file-upload_capture_en\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/12\/aws-s3-file-upload_capture_en.png?fit=615%2C630&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/12\/aws-s3-file-upload_capture_en.png?resize=1412%2C1446&#038;ssl=1\" alt=\"\" class=\"has-border-color wp-image-155289\" style=\"border-color:#009900;border-width:3px;border-radius:9px\" srcset=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/12\/aws-s3-file-upload_capture_en.png?w=1412&amp;ssl=1 1412w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/12\/aws-s3-file-upload_capture_en.png?resize=308%2C315&amp;ssl=1 308w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/12\/aws-s3-file-upload_capture_en.png?resize=615%2C630&amp;ssl=1 615w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/12\/aws-s3-file-upload_capture_en.png?resize=768%2C786&amp;ssl=1 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"margin-top:var(--wp--preset--spacing--30)\"><span>See also<\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/support.questetra.com\/en\/bpmn-icons\/intermediate-error-catch-event-boundary-type\/\" target=\"_blank\" rel=\"noreferrer noopener\">Intermediate Error Catch Event (Boundary Type)<\/a><\/li>\n<\/ul>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-coblocks-accordion\">\n<div class=\"wp-block-coblocks-accordion-item\"><details><summary class=\"wp-block-coblocks-accordion-item__title\">Script (click to open)<\/summary><div class=\"wp-block-coblocks-accordion-item__content\">\n<ul class=\"wp-block-list\">\n<li>An XML file that contains the code below is available to download\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/raw.githubusercontent.com\/Questetra\/Addon-XML\/release-2023-12-04\/aws-s3-file-upload.xml\" target=\"_blank\" rel=\"noreferrer noopener\">aws-s3-file-upload.xml<\/a> (C) Questetra, Inc. (MIT License)<\/li>\n\n\n\n<li>If you are using Professional, you can modify the contents of this file and use it as your own add-on auto step<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-js\" data-lang=\"JavaScript\"><code>\n\nconst MAX_OBJECT_KEY_BYTES = 1024;\nconst MAX_FILE_SIZE = 5 * 1024 * 1024 * 1024; \/\/ 5GB\uff08\u4e00\u5ea6\u306e PUT \u30ea\u30af\u30a8\u30b9\u30c8\u3067\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3067\u304d\u308b\u4e0a\u9650\uff09\n\nfunction main() {\n    \/\/\/\/\/\/ == \u5de5\u7a0b\u30b3\u30f3\u30d5\u30a3\u30b0\u30fb\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u30c7\u30fc\u30bf\u306e\u53c2\u7167 \/ Config & Data Retrieving ==\n    const awsKey = configs.getObject(&quot;conf_AccessKey&quot;).getToken();\n    const awsSecret = configs.getObject(&quot;conf_SecretKey&quot;).getToken();\n    const region = retrieveRegion();\n    const bucket = retrieveBucket();\n    const prefix = retrievePrefix();\n    const files = engine.findData(configs.getObject(&quot;conf_Files&quot;));\n\n    \/\/\/\/\/\/ == \u6f14\u7b97 \/ Calculating ==\n    if (files === null) { \/\/ \u30d5\u30a1\u30a4\u30eb\u6dfb\u4ed8\u306a\u3057\u306e\u5834\u5408\u3001\u4f55\u3082\u305b\u305a\u6b63\u5e38\u7d42\u4e86\n        return;\n    }\n    if (files.size() &gt; httpClient.getRequestingLimit()) {\n        throw new Error(&quot;The number of files exceeds the limit.&quot;);\n    }\n    for (let i = 0; i &lt; files.size(); i++) {\n        const file = files.get(i);\n        uploadFile(awsKey, awsSecret, region, bucket, prefix, file);\n    }\n}\n\n\/**\n * config \u304b\u3089\u30ea\u30fc\u30b8\u30e7\u30f3\u30b3\u30fc\u30c9\u3092\u8aad\u307f\u51fa\u3059\n * \u30ea\u30fc\u30b8\u30e7\u30f3\u30b3\u30fc\u30c9\u306e\u5f62\u5f0f\u3068\u3057\u3066\u4e0d\u6b63\u306a\u5834\u5408\u306f\u30a8\u30e9\u30fc\n * @return {String}\n *\/\nfunction retrieveRegion() {\n    const region = configs.get(&quot;conf_Region&quot;);\n    \/\/ \u4eca\u5f8c\u30ea\u30fc\u30b8\u30e7\u30f3\u304c\u5897\u3048\u308b\u3053\u3068\u3082\u8003\u3048\u3066\u3001\u4e2d\u592e\u306e\u6700\u5927\u6587\u5b57\u6570\u306b\u306f\u4f59\u88d5\u3092\u307f\u3066\u3044\u308b\n    const reg = new RegExp(&quot;^[a-z]{2}-[a-z]{4,16}-[1-9]$&quot;);\n    if (!reg.test(region)) {\n        throw new Error(&quot;Region Code is invalid.&quot;);\n    }\n    return region;\n}\n\n\/**\n * form-type=&quot;SELECT&quot; editable=&quot;true&quot;\n * \u306e\u8a2d\u5b9a\u5024\u3092\u8aad\u307f\u51fa\u3059\n * @return {String}\n *\/\nfunction getConfSelectValue(configName) {\n    const def = configs.getObject(configName);\n    if (def === null) {\n        return configs.get(configName);\n    }\n    return engine.findData(def) ?? &quot;&quot;;\n}\n\n\/**\n * config \u304b\u3089\u30d0\u30b1\u30c3\u30c8\u540d\u3092\u8aad\u307f\u51fa\u3059\n * \u30d0\u30b1\u30c3\u30c8\u540d\u306e\u5f62\u5f0f\u3068\u3057\u3066\u4e0d\u6b63\u306a\u5834\u5408\u306f\u30a8\u30e9\u30fc\n * @return {String}\n *\/\nfunction retrieveBucket() {\n    const bucket = getConfSelectValue(&quot;conf_Bucket&quot;);\n    if (bucket === &quot;&quot;) {\n        throw new Error(&quot;Bucket Name is blank.&quot;);\n    }\n    const reg = new RegExp(&quot;^[0-9a-z][0-9a-z-.]{1,61}[0-9a-z]$&quot;);\n    if (!reg.test(bucket) || bucket.includes(&quot;..&quot;)) {\n        throw new Error(&quot;Bucket Name is invalid.&quot;);\n    }\n    return bucket;\n}\n\n\/**\n * config \u304b\u3089\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30ad\u30fc\u306e\u30d7\u30ec\u30d5\u30a3\u30c3\u30af\u30b9\u3092\u8aad\u307f\u51fa\u3059\n * \u30d7\u30ec\u30d5\u30a3\u30c3\u30af\u30b9\u3060\u3051\u3067\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30ad\u30fc\u306e\u30b5\u30a4\u30ba\u4e0a\u9650\u306b\u9054\u3057\u3066\u3044\u308b\u5834\u5408\u3001\u30a8\u30e9\u30fc\n * @return {String}\n *\/\nfunction retrievePrefix() {\n    const prefix = getConfSelectValue(&quot;conf_Prefix&quot;);\n    if (encodeURIComponent(prefix).replace(\/%..\/g,&quot;x&quot;).length &gt; MAX_OBJECT_KEY_BYTES - 1) {\n        throw new Error(`The prefix is too long. Each object key must be less than ${MAX_OBJECT_KEY_BYTES} bytes including the prefix.`);\n    }\n    return prefix;\n}\n\n\/**\n * \u30d5\u30a1\u30a4\u30eb\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\n * @param key \u30a2\u30af\u30bb\u30b9\u30ad\u30fc\n * @param secret \u30b7\u30fc\u30af\u30ec\u30c3\u30c8\u30a2\u30af\u30bb\u30b9\u30ad\u30fc\n * @param region \u30ea\u30fc\u30b8\u30e7\u30f3\n * @param bucket \u30d0\u30b1\u30c3\u30c8\n * @param prefix \u30d7\u30ec\u30d5\u30a3\u30c3\u30af\u30b9\n * @param file \u30d5\u30a1\u30a4\u30eb\n *\/\nfunction uploadFile(key, secret, region, bucket, prefix, file) {\n    const objectKey = `${prefix}${file.getName()}`;\n    const encodedObjectKey = encodeURIComponent(objectKey);\n    if (encodedObjectKey.replace(\/%..\/g,&quot;x&quot;).length &gt; MAX_OBJECT_KEY_BYTES) {\n        throw new Error(`The object key &quot;${objectKey}&quot; is too long. Each object key must be less than ${MAX_OBJECT_KEY_BYTES} bytes.`);\n    }\n    if (file.getLength() &gt; MAX_FILE_SIZE) {\n        throw new Error(`The file &quot;${file.getName()}&quot; is too large. Each file must be less than ${MAX_FILE_SIZE} bytes.`);\n    }\n    const url = `https:\/\/${bucket}.s3.${region}.amazonaws.com\/${encodedObjectKey}`;\n    const response = httpClient.begin()\n        .awsSignV4(key, secret, region, &quot;s3&quot;)\n        \/\/ \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30ed\u30c3\u30af\u8a2d\u5b9a\u306e\u3042\u308b\u30d0\u30b1\u30c3\u30c8\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u5834\u5408\u3001\u8ffd\u52a0\u306e\u30c1\u30a7\u30c3\u30af\u30b5\u30e0\u3092\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\n        .header(&#39;x-amz-checksum-sha256&#39;, base64.encodeToString(digest.sha256(file)))\n        .body(file)\n        .put(url);\n    const status = response.getStatusCode();\n    if (status !== 200) {\n        engine.log(response.getResponseAsString());\n        throw new Error(`Failed to upload &quot;${file.getName()}&quot; to S3. status: ${status}`);\n    }\n}\n\n    <\/code><\/pre><\/div>\n<\/div><\/details><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>This item uploads files to the specified folder on Amazon S3.<\/p>\n","protected":false},"author":17,"featured_media":155421,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","_uag_custom_page_level_css":"","advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_seo_schema_type":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_wpcom_ai_launchpad_first_post":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"{title}\n\n{excerpt}\n\n{url}","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_wpas_customize_per_network":false,"jetpack_post_was_ever_published":false},"categories":[551],"tags":[],"faq_section":[],"class_list":["post-155288","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bpmn-icons"],"jetpack_publicize_connections":[],"uagb_featured_image_src":{"full":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/12\/bpmn-icon-service-task-aws.png?fit=1200%2C675&ssl=1",1200,675,false],"thumbnail":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/12\/bpmn-icon-service-task-aws.png?resize=440%2C440&ssl=1",440,440,true],"medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/12\/bpmn-icon-service-task-aws.png?fit=560%2C315&ssl=1",560,315,true],"medium_large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/12\/bpmn-icon-service-task-aws.png?fit=768%2C432&ssl=1",768,432,true],"large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/12\/bpmn-icon-service-task-aws.png?fit=1024%2C576&ssl=1",1024,576,true],"1536x1536":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/12\/bpmn-icon-service-task-aws.png?fit=1200%2C675&ssl=1",1200,675,true],"2048x2048":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/12\/bpmn-icon-service-task-aws.png?fit=1200%2C675&ssl=1",1200,675,true],"newspack-article-block-landscape-large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/12\/bpmn-icon-service-task-aws.png?resize=1200%2C675&ssl=1",1200,675,true],"newspack-article-block-portrait-large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/12\/bpmn-icon-service-task-aws.png?resize=900%2C675&ssl=1",900,675,true],"newspack-article-block-square-large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/12\/bpmn-icon-service-task-aws.png?resize=1200%2C675&ssl=1",1200,675,true],"newspack-article-block-landscape-medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/12\/bpmn-icon-service-task-aws.png?resize=800%2C600&ssl=1",800,600,true],"newspack-article-block-portrait-medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/12\/bpmn-icon-service-task-aws.png?resize=600%2C675&ssl=1",600,675,true],"newspack-article-block-square-medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/12\/bpmn-icon-service-task-aws.png?resize=800%2C675&ssl=1",800,675,true],"newspack-article-block-landscape-intermediate":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/12\/bpmn-icon-service-task-aws.png?resize=600%2C450&ssl=1",600,450,true],"newspack-article-block-portrait-intermediate":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/12\/bpmn-icon-service-task-aws.png?resize=450%2C600&ssl=1",450,600,true],"newspack-article-block-square-intermediate":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/12\/bpmn-icon-service-task-aws.png?resize=600%2C600&ssl=1",600,600,true],"newspack-article-block-landscape-small":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/12\/bpmn-icon-service-task-aws.png?resize=400%2C300&ssl=1",400,300,true],"newspack-article-block-portrait-small":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/12\/bpmn-icon-service-task-aws.png?resize=300%2C400&ssl=1",300,400,true],"newspack-article-block-square-small":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/12\/bpmn-icon-service-task-aws.png?resize=400%2C400&ssl=1",400,400,true],"newspack-article-block-landscape-tiny":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/12\/bpmn-icon-service-task-aws.png?resize=200%2C150&ssl=1",200,150,true],"newspack-article-block-portrait-tiny":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/12\/bpmn-icon-service-task-aws.png?resize=150%2C200&ssl=1",150,200,true],"newspack-article-block-square-tiny":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/12\/bpmn-icon-service-task-aws.png?resize=200%2C200&ssl=1",200,200,true],"newspack-article-block-uncropped":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/12\/bpmn-icon-service-task-aws.png?fit=1200%2C675&ssl=1",1200,675,true]},"uagb_author_info":{"display_name":"Shiho Tatsumi","author_link":"https:\/\/support.questetra.com\/en\/author\/tatsumi48c607ec82\/"},"uagb_comment_info":0,"uagb_excerpt":"This item uploads files to the specified folder on Amazon S3.","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9DiIh-EoE","jetpack-related-posts":[{"id":76390,"url":"https:\/\/support.questetra.com\/en\/bpmn-icons\/service-task-google-drive-file-upload\/","url_meta":{"origin":155288,"position":0},"title":"Google Drive: File Upload","author":"Hirotaka NISHI","date":"2019-04-23","format":false,"excerpt":"Uploads files specified in File Type Data Item to the specified folder of Google Drive. Capable of obtaining the file ID, the display URL, and the download URL as the response and storing them in a String type Data Item.","rel":"","context":"In &quot;BPMN Icons&quot;","block_context":{"text":"BPMN Icons","link":"https:\/\/support.questetra.com\/en\/category\/bpmn-icons\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-google-drive2024.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-google-drive2024.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-google-drive2024.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-google-drive2024.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-google-drive2024.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":96192,"url":"https:\/\/support.questetra.com\/en\/developer-blog\/onedrive-workflow-tutorial\/","url_meta":{"origin":155288,"position":1},"title":"Utilising OneDrive from Your Workflow","author":"Hirotaka NISHI","date":"2020-10-13","format":false,"excerpt":"We will describe some automated Tasks related to Microsoft 365 OneDrive for Business. Users can create folders and upload files to OneDrive.","rel":"","context":"In &quot;Questetra Developers Blog&quot;","block_context":{"text":"Questetra Developers Blog","link":"https:\/\/support.questetra.com\/en\/category\/developer-blog\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/09\/OneDrive-1.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/09\/OneDrive-1.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/09\/OneDrive-1.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/09\/OneDrive-1.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/09\/OneDrive-1.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":95321,"url":"https:\/\/support.questetra.com\/en\/developer-blog\/box-workflow-tutorial\/","url_meta":{"origin":155288,"position":2},"title":"Utilising Box From Your Workflow","author":"Peter Glover","date":"2026-08-18","format":false,"excerpt":"Describes the automatic Steps that links Questetra to Box. You can Upload files, Create folders, and so on.","rel":"","context":"In &quot;Questetra Developers Blog&quot;","block_context":{"text":"Questetra Developers Blog","link":"https:\/\/support.questetra.com\/en\/category\/developer-blog\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/09\/eyecatch-box.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/09\/eyecatch-box.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/09\/eyecatch-box.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/09\/eyecatch-box.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/09\/eyecatch-box.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":74763,"url":"https:\/\/support.questetra.com\/en\/developer-blog\/google-drive-items\/","url_meta":{"origin":155288,"position":3},"title":"Utilizing Google Drive from Workflow &#8211; Sending files to people outside the company","author":"Hirotaka NISHI","date":"2020-10-30","format":false,"excerpt":"Google Drive is a cloud storage service offered by Google. I will explain automatic Step for utilizing Google Drive in a Workflow App.","rel":"","context":"In \"Google Drive API v3\"","block_context":{"text":"Google Drive API v3","link":"https:\/\/support.questetra.com\/en\/tag\/google-drive-api-v3\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/10\/google-drive-questetra.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/10\/google-drive-questetra.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/10\/google-drive-questetra.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/10\/google-drive-questetra.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/10\/google-drive-questetra.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":71599,"url":"https:\/\/support.questetra.com\/en\/bpmn-icons\/googledrive-folderdelete\/","url_meta":{"origin":155288,"position":4},"title":"Google Drive: Delete File \/ Folder","author":"Hirotaka NISHI","date":"2024-12-12","format":false,"excerpt":"This item deletes files or folders on Google Drive.","rel":"","context":"In &quot;BPMN Icons&quot;","block_context":{"text":"BPMN Icons","link":"https:\/\/support.questetra.com\/en\/category\/bpmn-icons\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-google-drive2024.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-google-drive2024.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-google-drive2024.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-google-drive2024.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-google-drive2024.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":71830,"url":"https:\/\/support.questetra.com\/en\/bpmn-icons\/googledrive-permissioncreate\/","url_meta":{"origin":155288,"position":5},"title":"Google Drive: Create Shared Link","author":"Shiho Tatsumi","date":"2024-12-13","format":false,"excerpt":"This item creates a shared link for the specified file or folder on Google Drive. An error occurs when the file\/folder is already shared with anyone or within the domain.","rel":"","context":"In &quot;BPMN Icons&quot;","block_context":{"text":"BPMN Icons","link":"https:\/\/support.questetra.com\/en\/category\/bpmn-icons\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-google-drive2024.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-google-drive2024.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-google-drive2024.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-google-drive2024.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-google-drive2024.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/12\/bpmn-icon-service-task-aws.png?fit=1200%2C675&ssl=1","_links":{"self":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts\/155288","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/comments?post=155288"}],"version-history":[{"count":2,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts\/155288\/revisions"}],"predecessor-version":[{"id":155295,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts\/155288\/revisions\/155295"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/media\/155421"}],"wp:attachment":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/media?parent=155288"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/categories?post=155288"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/tags?post=155288"},{"taxonomy":"faq_section","embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/faq_section?post=155288"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}