title: AWS amplify: Error when uploading file to storage
body: <p>I am trying to upload a user's private file to AWS storage and I am facing 2 issues,</p>
  <pre><code>a. Storage.put throws a `Uncaught (in promise) No plugin found in Storage for the provider` on my local machine
  b. when I publish the application to aws, I get `a r[a].trim is not a function, the server responded with a status of 403 (Forbidden)` error.
  </code></pre>
  <p>I am using &quot;@aws-amplify/storage&quot;: &quot;^3.1.9&quot;, &quot;@aws-amplify/ui-vue&quot;: &quot;^0.2.5&quot;, &quot;aws-amplify&quot;: &quot;^3.0.11&quot;. I had previously updated to the latest versions of the above libraries but I faced the same issues.</p>
  <p><strong>Error in production:</strong></p>
  <pre><code>[WARN] 52:13.681 AWSS3Provider - error uploading TypeError: r[a].trim is not a function
      at P (chunk-vendors.3a69780c.js:96)
      at e.&lt;anonymous&gt; (chunk-vendors.3a69780c.js:96)
      at c (chunk-vendors.3a69780c.js:111)
      at Object.next (chunk-vendors.3a69780c.js:111)
      at s (chunk-vendors.3a69780c.js:111)
  </code></pre>
  <p><strong>Code(edited for brevity):</strong></p>
  <pre><code>import { Auth } from 'aws-amplify';
  import Storage from &quot;@aws-amplify/storage&quot;;
  var i;
          for (i = 0; i &lt; validFilesData.length; i++) 
          {
            let objectToBeUploaded=validFilesData[i];
            let config={level: 'private', contentType: 'video/mp4',};
            let result =await Storage.put('test.mp4', objectToBeUploaded, config);
          }
  </code></pre>
  <p><strong>aws-exports.js:</strong></p>
  <pre><code>const awsmobile = {
      &quot;aws_project_region&quot;: &quot;us-east-1&quot;,
      &quot;aws_cognito_identity_pool_id&quot;: &quot;us-east-1:d5bdd6ce-4ef4-4d25-81ac-47bcf08d9007&quot;,
      &quot;aws_cognito_region&quot;: &quot;us-east-1&quot;,
      &quot;aws_user_pools_id&quot;: &quot;us-east-1_b6sLX6k7X&quot;,
      &quot;aws_user_pools_web_client_id&quot;: &quot;6plmdr9nj2oo7hdofugbpctd6l&quot;,
      &quot;oauth&quot;: {},
      &quot;aws_appsync_graphqlEndpoint&quot;: &quot;https://yoxnhmkqojgsjjsmdudy5ytuli.appsync-api.us-east-1.amazonaws.com/graphql&quot;,
      &quot;aws_appsync_region&quot;: &quot;us-east-1&quot;,
      &quot;aws_appsync_authenticationType&quot;: &quot;AMAZON_COGNITO_USER_POOLS&quot;,
      &quot;aws_cloud_logic_custom&quot;: [
          {
              &quot;name&quot;: &quot;priceperhour&quot;,
              &quot;endpoint&quot;: &quot;https://qirua8wpa3.execute-api.us-east-1.amazonaws.com/dev&quot;,
              &quot;region&quot;: &quot;us-east-1&quot;
          },
          {
              &quot;name&quot;: &quot;PaymentIntent&quot;,
              &quot;endpoint&quot;: &quot;https://kalgi2en0k.execute-api.us-east-1.amazonaws.com/dev&quot;,
              &quot;region&quot;: &quot;us-east-1&quot;
          },
          {
              &quot;name&quot;: &quot;CreatePaymentIntent&quot;,
              &quot;endpoint&quot;: &quot;https://dplo9lvadc.execute-api.us-east-1.amazonaws.com/dev&quot;,
              &quot;region&quot;: &quot;us-east-1&quot;
          }
      ],
      &quot;aws_user_files_s3_bucket&quot;: &quot;vidaudtranscriptionb772eac002c6449096461a128cad70417-dev&quot;,
      &quot;aws_user_files_s3_bucket_region&quot;: &quot;us-east-1&quot;,
      &quot;aws_content_delivery_bucket&quot;: &quot;vidaudtranscription-20200703222552-hostingbucket-dev&quot;,
      &quot;aws_content_delivery_bucket_region&quot;: &quot;us-east-1&quot;,
      &quot;aws_content_delivery_url&quot;: &quot;http://vidaudtranscription-20200703222552-hostingbucket-dev.s3-website-us-east-1.amazonaws.com&quot;
  };
  export default awsmobile;
  </code></pre>
  <p><strong>main.js:</strong></p>
  <pre><code>import Amplify,{Storage} from 'aws-amplify';
  import '@aws-amplify/ui-vue';
  import aws_exports from './aws-exports';
  Amplify.configure(aws_exports);
  </code></pre>
  <p>I have added an issue for the aws amplify team <a href="https://github.com/aws-amplify/amplify-js/issues/6225" rel="nofollow noreferrer">here</a></p>