Skip to content

fix: Check Image upload size before attempting upload#251

Merged
Dorthu merged 2 commits intomasterfrom
bugfix/image-uplaod-check-max-upload-size
Jul 13, 2021
Merged

fix: Check Image upload size before attempting upload#251
Dorthu merged 2 commits intomasterfrom
bugfix/image-uplaod-check-max-upload-size

Conversation

@Dorthu
Copy link
Copy Markdown
Collaborator

@Dorthu Dorthu commented Jul 13, 2021

Closes #250

Right now, the image-upload plugin just attempts to upload whatever
it's given, but that can waste a lot of time.

This change checks that the compressed size is no larger than the
maximum allowed (5GB) before initiating the upload.

This change does not attempt to catch cases where the uncompressed
size of the image is larger than allowed; the maximum uncompressed size
is not constant, and the CLI has no way to know if an Image uploaded
will end up being too large when it gets there.

Closes #250

Right now, the `image-upload` plugin just attempts to upload whatever
it's given, but that can waste a lot of time.

This change checks that the compressed size is no larger than the
maximum allowed (5GB) before initiating the upload.

This change does not attempt to catch cases where the _uncompressed_
size of the image is larger than allowed; the maximum uncompressed size
is not constant, and the CLI has no way to know if an Image uploaded
will end up being too large when it gets there.
Comment thread linodecli/plugins/image-upload.py
@Dorthu Dorthu merged commit 9b7a170 into master Jul 13, 2021
@jriddle-linode jriddle-linode deleted the bugfix/image-uplaod-check-max-upload-size branch February 21, 2023 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

plugin image-upload should check size before uploading.

3 participants