+ /**
+ * Delete all categories and files from a given uri-id and user
+ *
+ * @param int $uri_id
+ * @param int $uid
+ * @return boolean success
+ * @throws \Exception
+ */
+ public static function deleteFileByURIId(int $uri_id, int $uid, int $type, string $file)
+ {
+ $tagid = Tag::getID($file);
+ if (empty($tagid)) {
+ return false;
+ }
+
+ return DBA::delete('post-category', ['uri-id' => $uri_id, 'uid' => $uid, 'type' => $type, 'tid' => $tagid]);
+ }