If you want to set minimum attachment size control to sys_attachment table you can create business rule to sys_attachment table as you can below. (Türkçe anlatım mevcuttur).
var size = 10240;
if(current.size_bytes < size){
if( current.content_type=='image/png' || current.content_type=='image/jpeg' || current.content_type=='image/gif' ){
gs.addInfoMessage( " Eklenti boyutu izin verilen sınırın altındadır. ( " + size + " ) " );
current.setAbortAction(true);
}
}
This code block will check attachment size and attachment type (jpeg,png,gif)
You can discart all image resized by your selection.
TR : Bu kod bloğu sayesinde belirlediğiniz ebatların altındaki görseller attachment tablosuna eklemeyecektir. Bu kodu sys_attachment tablosunda business rule olarak eklemeniz yeterlidir.


Deneyimini paylaş
Bir sorunun, farklı bir çözümün veya eklemek istediğin bir notun var mı?
Yorum yazmak için giriş yap veya aramıza katıl.
Giriş yap ↗︎Üye ol ↗︎