question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Images added to tickets not viewable

See original GitHub issue

Currently 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: view image results 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:closed
  • Created 4 years ago
  • Comments:19 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
rbwcommented, Aug 7, 2019

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.

1reaction
rbwcommented, Jul 30, 2019

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found