Forum OpenACS Development: Any reason not to put the site-node name in the file-storage root folder cr_item?

Request notifications

File storage currently creates a file-storage_1234 name for

Generally it seems is used as the name of the item to be used in constructing a URL. This makes things very easy to find a content item or folder from a URL and is absolutely necessary to get WebDAV working with file-storage. Currectly the URL for the folder is not stored anywhere in the database for a file-storage package instance root folder.

Here is the code that names the folder:

 v_folder_id := content_folder__new (
            v_package_key || ''_'' || new_root_folder__package_id, -- name
            v_folder_name, -- label
            v_description, -- description
            null                                  -- parent_id (default)

So should I change this to accept a name parameter and use the site-node name for the file-storage package instance for the folder name?

What happens when the site_node gets renamed, unmounted, etc? Are the callbacks honored?

There aren't any existing callbacks now, but yes callbacks would be needed to make sure the name was consistent with the location.

Actually if you wanted to mount one file-storage instance at two site-nodes with different names this wouldn't work.

How often is the ability to mount a package instance more than once used?

I agree with Dave.  I think its more logical this way.  Also I think news is in similar situation.  Currently I use a simple admin interface to create a folder with the user picking the name.