{% extends 'main/header.html' %}

{% block content %}
	<h2>Upload</h2>
	<form method="post" enctype="multipart/form-data">
		{% csrf_token %}
		
		<div class="file-field input-field">
			<div class="btn">
				<span>File</span>
			<input type="file" name = "document">
			</div>
			<div class="file-path-wrapper">
			<input class="file-path validate" type="text">
			</div>		
		</div>
		<div class="text">			
			<label>Neuer Name</label>
			<input type="text" name = "nfilename">
			</div>
		<button class="btn waves-effect waves-light" type="submit" name="action">upload file
		<i class="material-icons right">send</i>
		</button>
	</form>
	{% if url %}
		<p>Uploaded file: <a href="{{ url }}">{{ url }}</a></p>
	{% endif %}
{% endblock %}

