[MM-54770] Add ability to export profile pictures and fix importing them (#25042)
* add ability to export pp and fix import * remove unused nopSeeker * remove debug log * fix shadow vars * generate a warning instead of an error when unable to export profile picture * fix merge conflicts --------- Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
@@ -113,7 +113,7 @@ func (d *Decoder) DecodeConfig(rd io.Reader) (image.Config, string, error) {
|
||||
// GetDimensions returns the dimensions for the given encoded image data.
|
||||
func GetDimensions(imageData io.Reader) (int, int, error) {
|
||||
cfg, _, err := image.DecodeConfig(imageData)
|
||||
if seeker, ok := imageData.(io.ReadSeeker); ok {
|
||||
if seeker, ok := imageData.(io.Seeker); ok {
|
||||
defer seeker.Seek(0, 0)
|
||||
}
|
||||
return cfg.Width, cfg.Height, err
|
||||
|
||||
Ссылка в новой задаче
Block a user