Attach a file during Issue Creation

Does GitHub API support to attach a file to an Issue or its comments while creating the Issue?

Is there an API way to upload a file to GitHub Issue similar to drag and drop files action in the Browser?

Your help would be appreciated.

2 Likes

I do not understand. Did you use an API to upload an Image to the comment?

1 Like

I was wondering the same thing. I cannot find anything about it in the docs

Hey all :wave:

I really don’t think that it’s possible to submit a new file when creating an issue via REST:

…or via GraphQL:

…even in the issue object:

…there is not a way to upload a new file.

I think that during creation via either REST or GraphQL, you can reference an existing file that has already been uploaded.

Though, you can certainly upload files via the API:

But the issue creation endpoints don’t have the ability being requested specifically in this thread. For this type of feedback, I would highly encourage anyone in this thread submit their suggestions via this form: