Skip to content
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

SAK-45911 - Profile | Pronunciation recording clears other fields' data #11511

Merged
merged 4 commits into from
May 1, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Setting ths size as a constant
  • Loading branch information
jonespm committed Apr 30, 2023
commit e0e347f86ccd9c95f8fa7ef16d4f1fcbd28a7492
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ public class ProfileConstants {
*/

//default if not specified in sakai.properties as profile.picture.max (megs)
public static final int MAX_IMAGE_UPLOAD_SIZE = 2;
public static final int MAX_IMAGE_UPLOAD_SIZE = 2;
// Approx per second of pronouncation files in KB
public static final int PRONUNCIATION_SIZE_PER_SECOND = 500;

//one side will be scaled to this if larger. 200 is large enough
public static final int MAX_IMAGE_XY = 200;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public MyNamePronunciationEdit(final String id, final UserProfile userProfile) {
//setup form
Form form = new Form("form", new Model(userProfile));
form.setMultiPart(true);
form.setMaxSize(Bytes.megabytes((double)sakaiProxy.getNamePronunciationDuration() / 2));
form.setMaxSize(Bytes.kilobytes(sakaiProxy.getNamePronunciationDuration() * ProfileConstants.PRONUNCIATION_SIZE_PER_SECOND));

form.setOutputMarkupId(true);

Expand Down