I’m receiving customer tickets through a Webhook node. Everything is set up, however, I’m only receiving the screenshots sent in ‘binary’ form. To add an image to a GitHub Issue, so far it seems like I need the Screenshot URL. I’m wondering if there is a way for me to add the binary PNG file itself?
What is the error message (if any)?
No error message, I have tried the ‘Get Information’ from the screenshot png file, unfortunately, no URL there as well.
Please share your workflow
Share the output returned by the last node
The expected output I would like is to add the binary screenshot file to the body of the issue in GitHub
As far as I can remember from a discussion from a couple of years ago, the GitHub team didn’t provide API endpoints for this to avoid abuse of the service.
So, your option is to upload the images to a CDN and refer to them in the issue comment using markdown. That’s how it actually works on GitHub. It is just that GitHub UI uploads a file and creates a reference behind the scenes.
See this issue as an example. The file got uploaded and referenced to by embedding the following markdown fragment in the comment body:
You can even re-use it elsewhere, e.g. here:
If you want to keep images in the repo’s context, you may want to commit those files as orphaned (detached) commits using this API endpoint. However, orphaned commits can be removed by git garbage collection mechanisms. Alternatively, you could commit them to a dedicated repo branch.
Although I’d vote for a CDN that you can effectively control to keep repo clean and not be subjected to GitHub’s changes in handling files that are stored beyond repos.
If the above helps you to solve your issue, please mark this post as a Solution.
P.S. You need to put the workflow json between a pair of triple backticks for it to render properly.
``` Here goes the WF JSON
```
I assume you collect user inputs using web forms. If so then all data from user is contained in the network request which has no side effects by design. And you cannot have an url for a network request to access it past consumption as it is not stored on any persistent storage.
GitHub doesn’t have a concept of attachments in its classic meaning in issues, pull requests or any other github inter-user communication features for that matter.
Repos and LFS store could be used as file stores but connecting entities from there to issues et al is completely on the developer’s side.
If you have your question resolved, please mark my post above as a Solution.