title: Why is my s3 createPresignedPost not respecting the content-range-length condition
body: <p>I am trying to post a file to s3 using createPresignedPost. The file is posting to my bucket but it is not respecting the file size constraint. Here is my code and the file upload is base64 encoded string.</p>
  
  <pre><code>function postObjectSignedUrl(req) {
  const key = `${req + "/" + uuid.v4()}`;
  return new Promise(function (resolve, reject) {
      const params = {
          Bucket: 'base',
          Expires: 60 * 60, // in seconds,
          Fields: {
              key: key,
          },
          conditions: [
              ['content-length-range', 0,1000000]
          ]
  
  
      }
      s3.createPresignedPost(params, (err, data) =&gt; {
          if (err) {
              reject(err)
          } else {
              resolve(data);
          }
      })
  })
  </code></pre>
  
  <p>}</p>
  
  <p>My client side code is the following:</p>
  
  <pre><code>var data = new FormData();
  const getUrl = await getSignedUrl();
  const keys = getUrl["fields"];
  $.each(keys, function(key,value){
      data.append(key,value);
  });
  
  
  data.append("file", profilePic);
  try {
  
      const result = await fetch(getUrl["url"], {
          method: "POST",
          mode: "cors",
          headers: {
              'Access-Control-Allow-Origin': '*',
          },
          body: data
      })
      if (result.status === 204){
  
      }
  } catch (err) {
      console.log(err, " error ")
  }
  </code></pre>