Commit Graph

10 Commits (9c318a17f576887736e97c7bc2971d2ad7579a33)

Author SHA1 Message Date
Eng Zer Jun f2e7d5477f
refactor: move from io/ioutil to io and os package ()
The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil. This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
silverwind 1e6fa57acb
Use single shared random string generation function ()
* Use single shared random string generation function

- Replace 3 functions that do the same with 1 shared one
- Use crypto/rand over math/rand for a stronger RNG
- Output only alphanumerical for URL compatibilty

Fixes: 

* use const string method

* Update modules/avatar/avatar.go

Co-authored-by: a1012112796 <1012112796@qq.com>

Co-authored-by: a1012112796 <1012112796@qq.com>
Lunny Xiao 80a6b0f5bc
Avatars and Repo avatars support storing in minio ()
* Avatar support minio

* Support repo avatar minio storage

* Add missing migration

* Fix bug

* Fix test

* Add test for minio store type on avatars and repo avatars; Add documents

* Fix bug

* Fix bug

* Add back missed avatar link method

* refactor codes

* Simplify the codes

* Code improvements

* Fix lint

* Fix test mysql

* Fix test mysql

* Fix test mysql

* Fix settings

* Fix test

* fix test

* Fix bug
Rob Watson df2557835b Improve handling of non-square avatars ()
* Crop avatar before resizing ()

Signed-off-by: Rob Watson <rfwatson@users.noreply.github.com>

* Fix spelling error

Signed-off-by: Rob Watson <rfwatson@users.noreply.github.com>
Ethan Koenig d2329e1c26 Use assert in legacy unit tests ()
Unknwon 58e004f7da Remove cache avatar support and add its tests
skyblue 4662a73ac3 name change of avatar
shxsun 8376b0d53c use modeles/log instead log
Gogs 964e537479 append route to web
skyblue 8e47ae2102 add avatar inorder to view code on github