mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 00:32:29 -04:00
Allow images of any size as profile pictures
Signed-off-by: Marco <marcoambrosini@icloud.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com> Signed-off-by: Simon L <szaimen@e.mail.de> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
This commit is contained in:
parent
e63720b714
commit
1ef23e7708
3 changed files with 8 additions and 5 deletions
|
|
@ -61,7 +61,7 @@
|
|||
</template>
|
||||
</NcButton>
|
||||
</div>
|
||||
<span>{{ t('settings', 'png or jpg, max. 20 MB') }}</span>
|
||||
<span>{{ t('settings', 'The file must be a PNG or JPG') }}</span>
|
||||
<input ref="input"
|
||||
:id="inputId"
|
||||
type="file"
|
||||
|
|
@ -226,7 +226,10 @@ export default {
|
|||
this.showCropper = false
|
||||
this.loading = true
|
||||
|
||||
this.$refs.cropper.getCroppedCanvas().toBlob(async (blob) => {
|
||||
const canvasData = this.$refs.cropper.getCroppedCanvas()
|
||||
const scaleFactor = canvasData.width > 512 ? 512 / canvasData.width : 1
|
||||
|
||||
this.$refs.cropper.scale(scaleFactor, scaleFactor).getCroppedCanvas().toBlob(async (blob) => {
|
||||
if (blob === null) {
|
||||
showError(t('settings', 'Error cropping profile picture'))
|
||||
this.cancel()
|
||||
|
|
|
|||
4
dist/settings-vue-settings-personal-info.js
vendored
4
dist/settings-vue-settings-personal-info.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue