phacility/phabricator · error · Exception

Unsupported data encoding.

Error message

Unsupported data encoding.

What it means

Error "Unsupported data encoding." thrown in phacility/phabricator.

Source

Thrown at src/applications/files/conduit/FileUploadChunkConduitAPIMethod.php:44

  protected function execute(ConduitAPIRequest $request) {
    $viewer = $request->getUser();

    $file_phid = $request->getValue('filePHID');
    $file = $this->loadFileByPHID($viewer, $file_phid);

    $start = $request->getValue('byteStart');

    $data = $request->getValue('data');
    $encoding = $request->getValue('dataEncoding');
    switch ($encoding) {
      case 'base64':
        $data = $this->decodeBase64($data);
        break;
      case null:
        break;
      default:
        throw new Exception(pht('Unsupported data encoding.'));
    }
    $length = strlen($data);

    $chunk = $this->loadFileChunkForUpload(
      $viewer,
      $file,
      $start,
      $start + $length);

    // If this is the initial chunk, leave the MIME type unset so we detect
    // it and can update the parent file. If this is any other chunk, it has
    // no meaningful MIME type. Provide a default type so we can avoid writing
    // it to disk to perform MIME type detection.
    if (!$start) {
      $mime_type = null;
    } else {
      $mime_type = 'application/octet-stream';
    }

View on GitHub (pinned to 5720a38cfe)

When it happens

Trigger: Thrown at src/applications/files/conduit/FileUploadChunkConduitAPIMethod.php:44 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/8473bce6310b2cab. Report an issue: GitHub.