fs::max_upload_size (public)

 fs::max_upload_size [ -package_id package_id ]

Defined in packages/file-storage/tcl/file-storage-procs.tcl

Switches:
-package_id (optional)
id of the file-storage package instance. Will default to the connection package_id if not specified. Returns the maximum upload size for this file-storage instance. If the value from the parameter is empty, invalid, or bigger than the server-wide upload limit, the latter will take over.
Returns:
numeric value in bytes

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_add_file_to_folder fs_add_file_to_folder (test file-storage) fs::max_upload_size fs::max_upload_size test_fs_add_file_to_folder->fs::max_upload_size fs::unit_conv fs::unit_conv (private) fs::max_upload_size->fs::unit_conv parameter::get parameter::get (public) fs::max_upload_size->parameter::get packages/attachments/www/file-add-2.tcl packages/attachments/ www/file-add-2.tcl packages/attachments/www/file-add-2.tcl->fs::max_upload_size packages/file-storage/www/admin/upload-size-limit.tcl packages/file-storage/ www/admin/upload-size-limit.tcl packages/file-storage/www/admin/upload-size-limit.tcl->fs::max_upload_size packages/file-storage/www/file-add.tcl packages/file-storage/ www/file-add.tcl packages/file-storage/www/file-add.tcl->fs::max_upload_size packages/file-storage/www/folder-zip-add.tcl packages/file-storage/ www/folder-zip-add.tcl packages/file-storage/www/folder-zip-add.tcl->fs::max_upload_size

Testcases:
fs_add_file_to_folder
Source code:
    set max_bytes_param [fs::unit_conv [parameter::get  -package_id $package_id  -parameter "MaximumFileSize"]]
    if {![string is double -strict $max_bytes_param]} {
        set max_bytes_param Inf
    }

    set driver [expr {[ns_conn isconnected] ?
                      [ns_conn driver] :
                      [lindex [ns_driver names] 0]}]
    set section [ns_driversection -driver $driver]
    set max_bytes_conf [fs::unit_conv  [ns_config $section maxinput]]
    return [expr {min($max_bytes_param,$max_bytes_conf)}]
Generic XQL file:
packages/file-storage/tcl/file-storage-procs.xql

PostgreSQL XQL file:
packages/file-storage/tcl/file-storage-procs-postgresql.xql

Oracle XQL file:
packages/file-storage/tcl/file-storage-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: