implement dynamic changing max. allowed size of attachment