Skip to content

Commit

Permalink
Modify configuration file, and avatar image size should below 5MB
Browse files Browse the repository at this point in the history
  • Loading branch information
keke125 committed May 24, 2023
1 parent 72c38ff commit 2a53051
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/keke125/pixel/data/entity/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ public class User extends AbstractEntity implements UserDetails {
@Enumerated(EnumType.STRING)
@ElementCollection(fetch = FetchType.EAGER)
private Set<Role> roles;
// if avatar is more than 3MB, need to modify column length
// if avatar is more than 5MB, need to modify column length
@Lob
@Column(length = 3200000)
@Column(length = 5242880)
private byte[] avatarImage;
private String avatarImageName;
@NotNull
Expand Down
31 changes: 16 additions & 15 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
# port number
server.port=${PORT:8080}
logging.level.org.atmosphere=warn
spring.mustache.check-template-location=false
# Launch the default browser when starting the application in development mode
# vaadin.launch-browser=true
# To improve the performance during development.
# For more information https://vaadin.com/docs/flow/spring/tutorial-spring-configuration.html#special-configuration-parameters
vaadin.whitelisted-packages=com.vaadin,org.vaadin,dev.hilla,com.keke125.pixel
spring.jpa.defer-datasource-initialization=true
spring.sql.init.mode=always

# mariadb database
# For persistent storage without dropping the database when the app stops, choose the "update" option.
# For development mode where the database is created when the app starts and dropped when it stops, choose the "create-drop" option.
Expand All @@ -21,32 +13,41 @@ spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
# you need modify this value if you want upload bigger image
spring.servlet.multipart.max-file-size=30MB
spring.servlet.multipart.max-request-size=30MB
# BCrypt pbkdf2 argon2
app.idForEncode=argon2
# only file size below 10MB can be uploaded
# you can modify this value, but the limit is 2047MB
app.maxImageSizeInMegaBytes=10
# max 3 files can be uploaded
# you can modify this value
app.maxImageFiles=3
# only file size below 3MB can be uploaded
# you can modify this value, but the limit is 2047MB
# you can modify this value, but the limit is 5MB
app.maxAvatarSizeInMegaBytes=3
# The default image size limit for new sign-up users
# you can modify this value
app.newSignupImageSizeLimit=30
# BCrypt pbkdf2 argon2
app.idForEncode=argon2
# website location country
app.webCountry=Taiwan
# website name
app.webNameEN=Pixel Art Filter Web
app.webNameTC=Pixel Art Filter Web
# website description
app.webDescriptionEN=Officially Pixel Art Filter Web
app.webDescriptionTC=\u5B98\u65B9\u7248\u50CF\u7D20\u8F49\u63DB\u6FFE\u93E1
app.webDescriptionEN=Pixel Art Filter Web
app.webDescriptionTC=Pixel Art Filter Web
# website link
app.webLink=https://example.com
# admin contact email
app.adminContactEmail=[email protected]
# login form additional information
app.loginInfoTC=\u5982\u679C\u9047\u5230\u767B\u5165\u554F\u984C\uFF0C\u8ACB\u806F\u7E6B [email protected]
app.loginInfoEN=Contact [email protected] if you're experiencing issues logging into your account.
app.loginInfoEN=Contact [email protected] if you're experiencing issues logging into your account.
logging.level.org.atmosphere=warn
spring.mustache.check-template-location=false
# Launch the default browser when starting the application in development mode
# vaadin.launch-browser=true
# To improve the performance during development.
# For more information https://vaadin.com/docs/flow/spring/tutorial-spring-configuration.html#special-configuration-parameters
vaadin.whitelisted-packages=com.vaadin,org.vaadin,dev.hilla,com.keke125.pixel
spring.jpa.defer-datasource-initialization=true
spring.sql.init.mode=always

0 comments on commit 2a53051

Please sign in to comment.