upload_widget: Use img tag for tail-spin.svg instead of object tag.

We use img tag for showing the loading spinner in image_upload_widget
instead of object tag because using object tag gives the following
error "Refused to display 'https://chat.zulip.org/' in a frame because
it set 'X-Frame-Options' to 'deny'." in console.

As mentioned by Anders in czo, this is probably because we’re loading
the SVG using an <object> tag as if it’s totally-not-an-IE3-ActiveX-
control.

Discussed in #issues > loading tail-spin.svg denied by X-Frame-Options.
This commit is contained in:
sahil839 2021-07-16 14:45:47 +05:30 committed by Tim Abbott
parent 989d14299c
commit be8e7fdfb6
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@
{{ upload_text }}
</span>
<span class="upload-spinner-background">
<object class="image_upload_spinner" type="image/svg+xml" data="/static/images/tail-spin.svg"></object>
<img class="image_upload_spinner" src="/static/images/tail-spin.svg" alt="" />
</span>
</div>
<img class="image-block" src="{{ image }}"/>