{"record":{"id":"de0817b9b55d0529","repo":"phacility/phabricator","slug":"the-uri-s-does-not-correspond-to-a-valid-image","errorCode":null,"errorMessage":"The URI \"%s\" does not correspond to a valid image file (got a file with MIME type \"%s\"). You must specify the URI of a valid image file.","messagePattern":"The URI \"(.+?)\" does not correspond to a valid image file \\(got a file with MIME type \"(.+?)\"\\)\\. You must specify the URI of a valid image file\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/files/controller/PhabricatorFileImageProxyController.php","lineNumber":67,"sourceCode":"      // scanning networks and ports.\n      PhabricatorSystemActionEngine::willTakeAction(\n        array($viewer->getPHID()),\n        new PhabricatorFilesOutboundRequestAction(),\n        1);\n\n      $file = PhabricatorFile::newFromFileDownload(\n        $uri,\n        array(\n          'viewPolicy' => PhabricatorPolicies::POLICY_NOONE,\n          'canCDN' => true,\n        ));\n\n      if (!$file->isViewableImage()) {\n        $mime_type = $file->getMimeType();\n        $engine = new PhabricatorDestructionEngine();\n        $engine->destroyObject($file);\n        $file = null;\n        throw new Exception(\n          pht(\n            'The URI \"%s\" does not correspond to a valid image file (got '.\n            'a file with MIME type \"%s\"). You must specify the URI of a '.\n            'valid image file.',\n            $uri,\n            $mime_type));\n      }\n\n      $file->save();\n\n      $external_request\n        ->setIsSuccessful(1)\n        ->setFilePHID($file->getPHID());\n\n      $save_request = true;\n    } catch (HTTPFutureHTTPResponseStatus $status) {\n      $external_request\n        ->setIsSuccessful(0)","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/files/controller/PhabricatorFileImageProxyController.php#L49-L85","documentation":"Error \"The URI \"%s\" does not correspond to a valid image file (got a file with MIME type \"%s\"). You must specify the URI of a valid image file.\" thrown in phacility/phabricator.","triggerScenarios":"Thrown at src/applications/files/controller/PhabricatorFileImageProxyController.php:67 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}