I am trying to upload a structure of directories and files from a file system (linux debian) to content repository.
The way of manipulating folder is very straight forward. No problems with that. However, creating files is a bit tricky since i don't entirely understand the format of it.
I am using file-storage/www/file-add.tcl as a guide to write my script.
file-add.tcl copies the new file to a temporary directory /tmp/, treats it, and then upload it to CR.
ad_form -html { enctype multipart/form-data } -export { folder_id lock_title_p name } -form {
file_id:key
{upload_file:file {label \#file-storage.Upload_a_file\#} {html "size 30"}}
}
What is in upĺoad_file field? I printed it out but it only shows the filename.
how does it actually get the file and manipulate it to insert it into CR?
ps. i searched APIs to do the job but i haven't found any. There only APIs to do the other way around. From CR to FS