I am making a discord bot for chess. One of the commands that I currently have takes a board in FEN notation, and generates an image of the board, and uploads it to discord. The conversion process is FEN -> svg -> png. By utilizing binary strings for the image data, I am able to do this without any touches to the hard drive or temporary files. However, when it comes time to upload the file, I have to write the data to a temporary file for the sole purpose of uploading, which seems a bit unnecessary.
I am making a discord bot for chess. One of the commands that I currently have takes a board in FEN notation, and generates an image of the board, and uploads it to discord. The conversion process is FEN -> svg -> png. By utilizing binary strings for the image data, I am able to do this without any touches to the hard drive or temporary files. However, when it comes time to upload the file, I have to write the data to a temporary file for the sole purpose of uploading, which seems a bit unnecessary.