fs::webdav_url (public)

 fs::webdav_url -item_id item_id [ -root_folder_id root_folder_id ] \
    [ -package_id package_id ]

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

Provide URL for webdav access to file or folder

Switches:
-item_id (required)
folder_id or item_id of file-storage folder or file
-root_folder_id (optional)
root folder to resolve URL from
-package_id (optional)
Returns:
fully qualified URL for WebDAV access or empty string if item is not WebDAV enabled

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_publish_file fs_publish_file (test file-storage) fs::webdav_url fs::webdav_url test_fs_publish_file->fs::webdav_url ad_conn ad_conn (public) fs::webdav_url->ad_conn ad_url ad_url (public) fs::webdav_url->ad_url apm_package_url_from_id apm_package_url_from_id (public) fs::webdav_url->apm_package_url_from_id content::item::get_virtual_path content::item::get_virtual_path (public) fs::webdav_url->content::item::get_virtual_path fs::get_root_folder fs::get_root_folder (public) fs::webdav_url->fs::get_root_folder packages/file-storage/www/index.tcl packages/file-storage/ www/index.tcl packages/file-storage/www/index.tcl->fs::webdav_url

Testcases:
fs_publish_file
Source code:

    if {![fs::webdav_p]} {
        return ""
    }
    if {$package_id eq ""} {
        set package_id [ad_conn package_id]
    }

    if {$root_folder_id eq ""} {
        set root_folder_id [fs::get_root_folder -package_id $package_id]
    }

    if {"t" eq [oacs_dav::folder_enabled -folder_id $root_folder_id]} {
        if {$root_folder_id eq $item_id} {
            set url_stub ""
        } else {
            set url_stub [content::item::get_virtual_path -root_folder_id $root_folder_id -item_id $item_id]
        }
        set package_url [apm_package_url_from_id $package_id]

        set webdav_prefix [oacs_dav::uri_prefix]

        if { [security::RestrictLoginToSSLP] } {
            return "[security::get_secure_location]${webdav_prefix}${package_url}${url_stub}"
        } else {
            return "[ad_url]${webdav_prefix}${package_url}${url_stub}"
        }

    } else {

        return ""

    }
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: