Finally introduced Helma’s uploadSoftfail property to Antville – see http://groups.google.com/group/helma/msg/4455deb2e24e5d8a
This commit is contained in:
parent
8a2e33329b
commit
4a9017e251
3 changed files with 20 additions and 7 deletions
|
@ -20,8 +20,8 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
# $Revision$
|
||||
# $LastChangedBy$
|
||||
# $LastChangedDate$
|
||||
# $Author$
|
||||
# $Date$
|
||||
# $URL$
|
||||
#
|
||||
|
||||
|
@ -37,4 +37,5 @@ antville.repository.1 = ./apps/antville/db/h2.compat
|
|||
antville.mountpoint = /
|
||||
antville.static = ./apps/antville/static
|
||||
antville.staticMountpoint = /static
|
||||
antville.uploadLimit = 10240
|
||||
antville.uploadLimit = 10000
|
||||
antville.uploadSoftfail = true
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
// limitations under the License.
|
||||
//
|
||||
// $Revision$
|
||||
// $LastChangedBy$
|
||||
// $LastChangedDate$
|
||||
// $Author$
|
||||
// $Date$
|
||||
// $URL$
|
||||
|
||||
/**
|
||||
|
@ -60,6 +60,12 @@ Files.prototype.getPermission = function(action) {
|
|||
}
|
||||
|
||||
Files.prototype.create_action = function() {
|
||||
if (req.data.helma_upload_error) {
|
||||
res.message = gettext("Sorry, the file exceeds the maximum upload limit of {0} kB.",
|
||||
formatNumber(app.appsProperties.uploadLimit));
|
||||
res.redirect(this.href(req.action));
|
||||
}
|
||||
|
||||
if (this._parent.getDiskSpace() < 0) {
|
||||
res.message = gettext("Sorry, there is no disk space left. Please try to delete some files or images first.");
|
||||
res.redirect(this.href());
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
// limitations under the License.
|
||||
//
|
||||
// $Revision$
|
||||
// $LastChangedBy$
|
||||
// $LastChangedDate$
|
||||
// $Author$
|
||||
// $Date$
|
||||
// $URL$
|
||||
|
||||
/**
|
||||
|
@ -91,6 +91,12 @@ Images.prototype.main_action = function() {
|
|||
}
|
||||
|
||||
Images.prototype.create_action = function() {
|
||||
if (req.data.helma_upload_error) {
|
||||
res.message = gettext("Sorry, the file exceeds the maximum upload limit of {0} kB.",
|
||||
formatNumber(app.appsProperties.uploadLimit));
|
||||
res.redirect(this.href(req.action));
|
||||
}
|
||||
|
||||
if (res.handlers.site.getDiskSpace() < 0) {
|
||||
res.message = gettext("Sorry, there is no disk space left. Please try to delete some files or images first.");
|
||||
res.redirect(this.href());
|
||||
|
|
Loading…
Add table
Reference in a new issue