How to restrict the image file to upload in employee profile page when fill exceeds 300 kb
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2024 02:38 AM
I've been assigned a task to restrict the upload of a profile cover image on the Employee Profile page in the Employee Center if the file size exceeds 300 KB. I'm using the Employee Profile Header widget to implement this functionality. If the file size exceeds the limit, an error message should appear indicating that the file size has been exceeded.
Writing a Business Rule on the table is not allowed for this requirement.
Could anyone suggest the best practices or approaches to validate the file size and meet this requirement?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2024 01:33 AM
Can you explain why the options that have been provided won't work for you? The requirement is to limit the size of the attachment. Use of a BR or customizing the widget are provided as answers and you are only asking for other ways to do so? What is the limitation? Why can't you just use a BR?
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2024 12:50 AM
Put some logs in that BR to see where it goes wrong.
Why is the 'if' statement in there at the start? Does the BR reach that 'if'? A before BR on the attachment table for the table should be enough to just validate the size and then abort the upload. I don't know where your BR is failing, because I don't know your instance.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
