label_printer/flask/templates/image.html

19 lines
611 B
HTML

{% extends "base.html" %}
{% block content %}
<h1>Upload Image</h1>
<form method="POST" enctype="multipart/form-data">
<input type="file" name="image">
<input type="submit" value="Upload">
</form>
{% if filename %}
<h2>Uploaded Image:</h2>
<img src="{{ url_for('uploaded_file', filename=filename) }}" alt="Uploaded Image" style="max-width:300px;">
{% if valid %}
<p style="color: green;">Height: {{ height }} px</p>
{% else %}
<p style="color: red;">Height: {{ height }} px</p>
{% endif %}
{% endif %}
{% endblock %}