vue-dropzone icon indicating copy to clipboard operation
vue-dropzone copied to clipboard

resizeWidth does not resize images for s3 upload

Open adarshmadrecha opened this issue 5 years ago • 4 comments

When resizeWidth option is set, the file which is uploaded to S3 is not resized.

Just FYI: The file which is received by url endpoint is resized, this means the dropzone is resizing the image, it's just that s3 endpoint is not receiving the resized image. S3 endpoint is receiving original image.

          <vue-dropzone
              ref="myVueDropzone"
              :awss3="awss3"
              id="dropzone"
              :options="dropzoneOptions"
              v-on:vdropzone-success="fileUploaded"
            ></vue-dropzone>
data() {
    return {
      dropzoneOptions: {
        url: process.env.VUE_APP_API_URL,
        resizeWidth: 1080,
        resizeHeight: 1080,
        resizeMethod: "contain",
        acceptedFiles: "image/*"
      }
    };
  },
  computed: {
    awss3() {
      function returnUrl() {
        return `${process.env.VUE_APP_API_URL}/a/awssigningurl`;
      }
      const { jwt } = this.$store.state.auth;
      return {
        signingURL: returnUrl,
        sendFileToServer: true,
        withCredentials: false,
        headers: {
          Authorization: jwt,
        }
      };
    }
  },

adarshmadrecha avatar Mar 08 '20 07:03 adarshmadrecha

This issue was also mentioned in #157, #355 but closed. In issue #379 the discussion is not being continued.

adarshmadrecha avatar Mar 08 '20 07:03 adarshmadrecha

Hi @adarshmadrecha

The S3 implementation is very light-weight so resizing isn't yet supported. Alot of work needs to happen for the s3 stuff so I'm not able to put a timeframe on it sorry

rowanwins avatar May 03 '20 13:05 rowanwins

Whoops accidentally closed

rowanwins avatar May 03 '20 13:05 rowanwins

Any update on this? Im using drop zone 5.9.2 and direct uploads to S3 are not being resized, compressed, etc. Love drop zone!!!

atstockland avatar May 10 '21 21:05 atstockland