Files uploaded via webhook with embedded payload suddenly stopped showing the file in the message for no apparent reason.
- Uploaded file type:
.7z
- The code used:
from discord_webhook import DiscordWebhook
def upload_file(fpath):
embeds = [
{
"fields": [
{
"name": "RGAC File Upload",
"value": 'TEST'
}
],
"color": 0xeaddca,
"title": "RGAC Session File",
"image": {
"url": "attachment://{}".format(os.path.basename(fpath))
},
"footer": {
"text": "Captured by RGAC system"
},
"thumbnail": {
"url": THUMB,
}
}
]
webhook = WEBHOOK
wh = DiscordWebhook(
url=webhook,
embeds=embeds,
)
with open(fpath, "rb") as f:
wh.add_file(file=f.read(), filename=os.path.basename(fpath))
try:
wh.execute()
except:
err = traceback.format_exc()
print(err)
return 1
return 0
- Screenshot of the message:

** The illustration is pointing to where the file was meant to be shown
Files uploaded via webhook with embedded payload suddenly stopped showing the file in the message for no apparent reason.
.7z** The illustration is pointing to where the file was meant to be shown