Home
The Toolkit for Online Communities
17476 Community Members, 0 members online, 2128 visitors today
Log In Register
OpenACS Home : Forums : OpenACS Development : problems with unique name constraint in cr_items -- file-storage : One Message

Forum OpenACS Development: Re: Re: problems with unique name constraint in cr_items -- file-storage

Here is a patch that checks the BehaveLikeFilesystemP param for a file-storage instance to handle this situation:

  • If BehaveLikeFilesystemP == 1, then file-add.tcl "overwrites" the existing file by adding the new upload as a new version to it and making that new version the live one -- ie just as the current code works.
  • If BehaveLikeFilesystemP == 0, then file-add.tcl alters the filename by appending the new file_id (well, object_id) to provide a guaranteed-unique name, then adding the new upload as a new file in the folder.
  • The patch also provides some I18n instructions explaining what's going on.
  • This is a pretty simple fix, so unless I hear screams from someone soon, I'll go ahead and commit this to oacs-5-2.