Querying attachments per file type

プラットフォームについて: Data Center のみ。 - This article only applies to Atlassian apps on the Data Center プラットフォーム

この KB は Data Center バージョンの製品用に作成されています。Data Center 固有ではない機能の Data Center KB は、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。 Server* 製品のサポートは 2024 年 2 月 15 日に終了しました。Server 製品を実行している場合は、 アトラシアン Server サポート終了 のお知らせにアクセスして、移行オプションを確認してください。

*Fisheye および Crucible は除く

要約

このページの内容はサポート対象外のプラットフォームに関連しています。したがって、アトラシアン サポートではこのページの記載内容のサポートの提供は保証されません。この資料は情報提供のみを目的として提供されています。内容はお客様自身の責任でご利用ください。

To retrieve the list of Jira attachments based on their file type. The results contain the attachment ID, file name, project key, and issue number.

ソリューション

To retrieve a list where the file type is based on filename extensions run the following query, replacing .png with the file extension you want:

SELECT fa.id, fa.filename, p.pkey, ji.issuenum FROM fileattachment fa JOIN jiraissue ji ON ji.id = fa.issueid JOIN project p ON p.id = ji.project WHERE LOWER(fa.filename) LIKE '%.png';

To retrieve a list where the file type is based on MIME type run the following query, replacing image/png with the MIME type you want:

SELECT fa.id, fa.filename, p.pkey, ji.issuenum FROM fileattachment fa JOIN jiraissue ji ON ji.id = fa.issueid JOIN project p ON p.id = ji.project WHERE LOWER(fa.mimetype) = 'image/png';
更新日時: September 26, 2025

さらにヘルプが必要ですか?

アトラシアン コミュニティをご利用ください。