-
Notifications
You must be signed in to change notification settings - Fork 392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backport #493 to v2 #497
Backport #493 to v2 #497
Conversation
Sets the "filesize" property in the attachment metadata when initially uploading images, so that it doesn't have to be queried for in wp_prepare_attachment_for_js() ajax response.
The attachment metadata array doesn't always have a "file" attribute. This uses the core API for getting the attached file rather than building it from the file path and the upload dir.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Linting failed (1161 errors).
(1152 notices occurred in your codebase, but were on files/lines not included in this PR.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@goldenapples I might be wrong, but I think we might not have used return type declarations as it's not supported by the version of PHP supported in 2x. Before merging could you just verify if we are using them elsewhere?
v2 of S3-Uploads should continue supporting older versions of PHP. Removing the return type declaration here to avoid fatals.
awesome thanks |
tagged version 2.2.3 https://github.com/humanmade/S3-Uploads/releases/tag/2.2.3 |
This PR manually backports the patch from #493 to the v2 branch.
See #492.