I want to attach files bigger then 150 mb by using Jira API, how is that possible?
Can you verify the attachment size configured in your instance?
If you do it manually, how big can the file be?
There shouldnt be a 10mb limit. Check the docs if you have anything missing.
Searching for clues, I saw they added code to manage the chunks. cant find it again.
Maybe that's the problem?
Regards
You can use /rest/api/3/attachment/meta endpoint to get the limit configured for you jira instance.
You can configure max size from in JIRA settings. https://support.atlassian.com/jira-cloud-administration/docs/configure-file-attachments/
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I read somewhere that Size limit for attachment posted by Jira API, cannot be changed, from 10mb. From UI you can attach bigger files but not with API
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @dan
The 10mb limit is for server/DC (the default value). Jira cloud should be 1gb default.
In Attachment Size, specify the maximum attachment size. The default (per file) is 1 GB. The maximum attachment size (per file) is 2 GB.
https://support.atlassian.com/jira-cloud-administration/docs/configure-file-attachments/
Check the attachment limit set on your instance.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's indeed for DC/Server, make sure to read Cloud related kb.
Admin gear > Attachments > Edit Settings
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you, you both point to same link, but this is known. I am asking for Attachment Size when issue is created by using Agile rest API, not by using UI. For example,
public async Task UploadAttachmentAsync(string issueKey, string filePath)
{
using var client = CreateJiraClient();
client.DefaultRequestHeaders.Add("X-Atlassian-Token", "no-check");
using var form = new MultipartFormDataContent();
using var fileStream = File.OpenRead(filePath);
var fileContent = new StreamContent(fileStream);
fileContent.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream");
form.Add(fileContent, "file", Path.GetFileName(filePath));
var response = await client.PostAsync(
$"/rest/api/3/issue/{issueKey}/attachments",
form);
response.EnsureSuccessStatusCode();
}
I hit limit of 10MB per attachment, is that documented somewhere
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So the error you have is 413 request entity too large ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes
And configured is 1GB per attachment, so I am searching for link where this is documented
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If your file is less than 1GB and total amount of attachment is less than the storage limit of you plan and you have the proper permission to upload attachments, I invite you to raise a request to Atlassian support.
If you do it through the UI for that issue, do you have an error as well ?
https://support.atlassian.com/jira-cloud-administration/docs/configure-file-attachments/
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.