Thank you! I took the code you sent and modified it and got it working.
Here's the solution for anyone else struggling with this problem. I am
using Python2.7 and Flask and I want to render an SVG image in my Jinja2
template using an <img> tag.
<img draggable="false" id="background-img" alt="Litpen" title="Litpen" src="{{
url_for('static', filename='litpen-homepage.svg') }}" />
This is the app.yaml handlers code that allows this beautiful rendering to
happen :)
handlers:
- url: /static/(.*\.svg)
static_files: static/\1
upload: static/(.*\.svg)
mime_type: image/svg+xml
- url: /.*
script: main.app
On Friday, June 26, 2015 at 11:32:13 AM UTC-7, Michael (Cloud Platform
Support) wrote:
>
> Hi Jesus,
>
> Thank you for getting back to me. I recommend adding the below to your
> app.yaml's handlers and trying it out then:
> handlers:
> - url: /(.*\.svg)
> static_files: static/\1
> upload: static/(.*\.svg)
> mime_type: image/svg+xml
>
> This should resolve your issue.
>
> Cheers!
>
>
> On Sunday, June 21, 2015 at 6:08:10 PM UTC-4, Jesus Noland wrote:
>>
>> When I run the local development environment my SVG file renders
>> correctly on the web page but when I upload the app to my custom domain
>> with SSL the image type is octet-stream. I have tried updating the app's
>> YAML file but I can't get it to serve right. What do I need to do to get
>> the SVG file to render as an image on a webpage on a custom domain with SSL?
>>
>> My app is running on Python2.7 and Flask.
>>
>> Your answers are great appreciated. Thanks
>>
>
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-appengine/5e628d22-c68b-416a-976a-3da1e3a5b89f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.