RewriteRule "^file/(\d+)$" "/file/index.php?fileId=$1" [QSA,L]

# NEW API
# TODO when we depricate the old API update apache to point to Api/Controllers

RewriteRule "^file/fileFolder/$" "/Api/Controllers/file/fileFolder/index.php" [QSA,L]
RewriteRule "^file/fileFolder/${uuid}/$" "/Api/Controllers/file/fileFolder/index.php?fileFolderId=$1" [QSA,L]
RewriteRule "^file/fileFolder/${uuid}/file/$" "/Api/Controllers/file/index.php?fileFolderId=$1" [QSA,L]
RewriteRule "^file/fileFolder/${uuid}/file/${uuid}/$" "/Api/Controllers/file/index.php?fileFolderId=$1&fileId=$2" [QSA,L]
RewriteRule "^file/fileFolder/${uuid}/contents/$" "/Api/Controllers/file/fileFolder/folderContents.php?fileFolderId=$1" [QSA,L]
RewriteRule "^file/fileFolder/contents/$" "/Api/Controllers/file/fileFolder/folderContents.php" [QSA,L]

RewriteRule "^file/file/$" "Api/Controllers/file/index.php" [QSA,L]
RewriteRule "^file/file/${uuid}/$" "Api/Controllers/file/index.php?fileId=$1" [QSA,L]

RewriteRule "^file/folderAccessPermission/$" "/Api/Controllers/file/folderAccessPermission/index.php" [QSA,L]
RewriteRule "^file/folderAccessPermission/${uuid}/$" "/Api/Controllers/file/folderAccessPermission/index.php?folderAccessPermissionId=$1" [QSA,L]

# TODO (consider)
# Do we want to make fileStorageLocation the REST Root??
# EG below for "new" files?
# RewriteRule "^file/fileStorageLocation/${uuid}/file/$" "Api/Controllers/file/index.php?fileStorageLocationId=$1" [QSA,L]
# RewriteRule "^file/fileStorageLocation/${uuid}/file/${uuid}/$" "Api/Controllers/file/index.php?fileStorageLocationId=$1&fileId=$2" [QSA,L]
