Need to restrict the attachment variable only able to upload png and jpg images, and the size would be below 2mb
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2022 02:06 AM
Hi Team,
In the catalog item i have field called 'image' (type is attachment).
in that i need to provide the access only able to upload the images, the image format would be jpg and png.
the image size would be below 2mb.
can anyone help me with the on submit client script.
Regards,
Banu
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2022 03:45 AM
Try the below in your attributes
allowed_extensions=jpg;png, max_file_size=2
Both the attributes should be separated by comma (,)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2022 03:48 AM
it works fine, but when am using the wrong files i can able to submit the request.
i need to restrict the submission of request when the type is not png and jpg and maximum limit 2 mb.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2022 09:32 AM
You have to set only allowed extensions over there, The system will restrict not allowed extensions by automatic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-10-2024 02:20 PM
the properties should be separated by commas
allowed_extensions=jpg;png, max_file_size=2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-16-2023 05:16 AM
Hi Sai,
Can we also restrict to have only 1 attachment for the variable per request submit ?
Currently the variable allows update option and when clicked on Update it does not wipe out previous attachment and instead adds another attachment making it a multiple attachment variable. Can you please suggest anything on this?
Thanks,
Sumana