Skip to content

resizeWidth does not resize images for s3 upload #532

Open
@adarshmadrecha

Description

@adarshmadrecha

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,
        }
      };
    }
  },

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions