Images added to tickets not viewable
See original GitHub issueCurrently I’m adding images to Snow just like any other attachment:
def post_call(new_record):
incident = c.resource(api_path='/table/new_call')
result = incident.create(payload=new_record)
sys_id = result.one().get('sys_id')
att_list = new_record['attachment_list']
for att in att_list:
incident.attachments.upload(sys_id=sys_id, file_path=att)
However when I try to view an image that’s added like this it just shows the raw image data:
If I download the image first it works just fine.
I assume this is because the images are not marked as images by PySnow. I looked through the PySnow documentation and I couldn’t find anything regarding a setting, so thought it might be a bug.
Issue Analytics
- State:
- Created 4 years ago
- Comments:19 (9 by maintainers)
Top Results From Across the Web
Why are the images in my tickets broken? - Zendesk help
Most often this is the result of Support not having permission to access the image. Zendesk inherits the access permissions for images added ......
Read more >Picture not showing when client receive tickets -
The picture of the tickets is not showing when the clients receive their ticket. When the tickets are sent by email, there's a...
Read more >Picture attachments or inserts not showing
Try accessing the tickets with attachments and images in an incognito window of the browser. Also, clear the cache cookies of the browser...
Read more >Is there a way to not show thumbnail images in Board view of ...
Edit: Added screenshot of what I see on my Board view. Images blurred and titles censored. There are two tickets with pictures attached....
Read more >Why can I not see the images on my website? - Encode.Host
There are several possible reasons why your images are not showing up on your pages as expected: ... Broken links or images cannot...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
python-magic requires libmagic, which is available out of the box on most Linux distros. On Mac or Windows, you’ll need to install this library manually to get python-magic to build–or use the python-magic-bin fork, which comes with a precompiled libmagic. Problem is, python-magic-bin is not available on Linux.
So, with this in mind, I implemented a conditional import of the python-magic library, and If it fails, the warning with hints about python-magic-bin is shown (seen in your first screenshot), and content-type becomes “text/plain” for all uploads.
Hello,
Yes, you’re right. We need to detect and set the appropriate content type. Shouldn’t be too hard to fix, I’ll have this implemented shortly.
Thanks for reporting!
/Robert