On version 6, we used to have Business Object rules in order to stop people uploading large documents which would crash the system. However, as per Support, with version 7 - 7.1, these no longer work.
At some point in a future build, we'll be able to limit file size uploads in the config, however for now, the below can be used if anyone is interested.
For a single Doc attribute on a form - use the following Advanced Script:
var oldUpload = config.config.upload;
config.config.upload = function (e)
{
for (var i = 0; i < e.files.length; ++ i)
{
if (e.files[i].size > 10000 /* specify desired size in bytes here */)
{
alert ("file " + e.files[i].name + "." + e.files[i].extension + " is too large");
e.preventDefault ();
return;
}
}
oldUpload.call (this, e);
}
For the multiple file upload there is no solution other than modifying Aware IM code. You need to add similar code to the file AwareIM/Tomcat/webapps/AwareIM/aware_kendo/mfu.js
You need to change the following bit of code
var wc = {
async: {
saveUrl: AwareApp.m_serverUrl + "request.awmu?",
removeUrl: AwareApp.m_serverUrl + "request.awmu?"
},
upload: function (e) {
me.onUploadRemove (e, false);
},
remove: function (e) {
me.onUploadRemove (e, true);
},
error: function (e) {
me.onError (e);
}
};
to this:
var wc = {
async: {
saveUrl: AwareApp.m_serverUrl + "request.awmu?",
removeUrl: AwareApp.m_serverUrl + "request.awmu?"
},
upload: function (e) {
if (true)
{
for (var i = 0; i < e.files.length; ++ i)
{
if (e.files[i].size > 10000 /* specify desired size in bytes here */)
{
alert ("file " + e.files[i].name + "." + e.files[i].extension + " is too large");
e.preventDefault ();
return;
}
}
}
me.onUploadRemove (e, false);
},
remove: function (e) {
me.onUploadRemove (e, true);
},
error: function (e) {
me.onError (e);
}
};
This will apply to every multi-file upload. If you want to do it for a specific process or document attribute you need to analyse me.m_config which defines specific parameters of MFU and change this bit:
if (true)
{
for (var i = 0; i < e.files.length; ++ i)
{
to
if (condition when to perform validation)
{
for (var i = 0; i < e.files.length; ++ i)
{
I've got it applying to all multi uploads, I didn't get into the me.m_config file.