fs::impl::fs_object::put (private)
fs::impl::fs_object::put
Defined in packages/file-storage/tcl/file-storage-dav-procs.tcl
PUT method
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set user_id [oacs_dav::conn user_id] set item_id [oacs_dav::conn item_id] set root_folder_id [oacs_dav::conn folder_id] set uri [oacs_dav::conn uri] if {"unlocked" ne [tdav::check_lock $uri] } { return [list 423] } set tmp_filename [oacs_dav::conn tmpfile] set tmp_size [ad_file size $tmp_filename] set name [oacs_dav::conn item_name] set parent_id [oacs_dav::item_parent_folder_id $uri] array set sn [site_node::get -url $uri] set package_id $sn(package_id) ns_log debug "\n ----- \n file_storage::dav::put package_id $package_id \n parent_id $parent_id \n uri $uri \n ----- \n " if {$parent_id eq ""} { set response [list 409] return $response } if {$item_id eq ""} { fs::add_file -package_id $package_id -name $name -title $name -item_id $item_id -parent_id $parent_id -tmp_filename $tmp_filename -creation_user $user_id -creation_ip [ad_conn peeraddr] if {[file exists [tdav::get_lock_file $uri]]} { # if there is a null lock use 204 set response [list 204] } else { set response [list 201] } } else { fs::add_version -name $name -title $name -tmp_filename $tmp_filename -item_id $item_id -creation_user $user_id -package_id $package_id set response [list 204] } file delete -- $tmp_filename return $responseXQL Not present: Generic, PostgreSQL, Oracle