Index: openacs-4/packages/file-storage/www/file-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/Attic/file-add-2.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/file-storage/www/file-add-2.tcl 18 Nov 2002 18:01:05 -0000 1.9 +++ openacs-4/packages/file-storage/www/file-add-2.tcl 17 May 2003 10:39:54 -0000 1.10 @@ -41,10 +41,7 @@ # Get the ip set creation_ip [ad_conn peeraddr] -# The content repository is kinda stupid about mime types, -# so we have to check if we know about this one and possibly -# add it. -set mime_type [fs_maybe_create_new_mime_type $upload_file] +set mime_type [cr_filename_to_mime_type -create $upload_file] # Get the storage type set indb_p [ad_parameter "StoreFilesInDatabaseP" -package_id [ad_conn package_id]] @@ -82,7 +79,14 @@ } + # We know the user has write permission to this folder, but they may not have admin privileges. + # They should always be able to admin their own file by default, so they can delete it, control + # who can read it, etc. + if { [string is false [permission::permission_p -party_id $user_id -object_id $folder_id -privilege admin]] } { + permission::grant -party_id $user_id -object_id $file_id -privilege admin + } + } on_error { # most likely a duplicate name or a double click