Added private links
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
<h3>
|
||||
{{ resource.name }}
|
||||
{% if download %}
|
||||
<small><a href="{{ download }}">
|
||||
<small><a href="{{ download }}" target="_blank" rel="noopener noreferrer">
|
||||
<i class="fas fa-download"></i> Download
|
||||
</a></small>
|
||||
{% endif %}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
|
||||
<div class="narrow">
|
||||
<h3 id="status">Select a file for upload</h3>
|
||||
<h3 id="status">File upload</h3>
|
||||
<form method="POST" action="{{ upload.url }}" enctype="multipart/form-data" id="item-upload" class="dropzone">
|
||||
<div class="fallback">
|
||||
{% for field, value in upload.fields.items %}
|
||||
@@ -55,11 +55,11 @@ Dropzone.options.itemUpload = {
|
||||
autoProcessQueue: false,
|
||||
createImageThumbnails: false,
|
||||
//acceptedFiles: acceptFiles,
|
||||
timeout: 3600000,
|
||||
timeout: 3600000,
|
||||
maxFiles: 1,
|
||||
addRemoveLinks: true,
|
||||
maxFilesize: 500,
|
||||
dictDefaultMessage: "Select a file to upload (max 500Mb)",
|
||||
dictDefaultMessage: "Click to select a file to upload (max 500Mb)",
|
||||
dictFallbackMessage: "Your browser is old!, using alternative method",
|
||||
init: function() {
|
||||
let dz = this;
|
||||
@@ -79,6 +79,9 @@ Dropzone.options.itemUpload = {
|
||||
let s3_location = f.xhr.getResponseHeader("Location");
|
||||
location.href = "{{ success_url }}?location=" + s3_location;
|
||||
});
|
||||
this.on('error', function(file, msg) {
|
||||
status.html('There was an issue - please see troubleshooting');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -5,7 +5,10 @@
|
||||
<h3>Excellent, you are ready to make a submission!</h3>
|
||||
<p>
|
||||
Please enter some basic information so we can identify your submission and
|
||||
note anything that might be relevant.
|
||||
note anything that might be relevant.<br/>
|
||||
Most people will want to upload their
|
||||
file directly but if you have your own cloud storage provider you can send a
|
||||
public link to your submission instead.
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
@@ -13,6 +16,7 @@
|
||||
{% csrf_token %}
|
||||
{{ form }}
|
||||
<div class="form-actions">
|
||||
<a href="{% url 'project_detail' project.pk %}">Cancel</a>
|
||||
<button type="submit" class="btn-primary">Continue</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
<tr><th>From:</th><td>{{ submission.name }}</td></tr>
|
||||
<tr><th>Instrument:</th><td>{{ submission.instrument }}</td></tr>
|
||||
<tr><th>Notes:</th><td>{{ submission.notes }}</td></tr>
|
||||
{% if download %}
|
||||
<tr><th>Download:</th><td><a href="{{ download }}">{{ submission.key }}</a></td></tr>
|
||||
{% if can_download %}
|
||||
<tr><th>Download:</th><td><a href="{{ submission.download_url }}" target="_blank" rel="noopener noreferrer">{{ submission.download_name }}</a></td></tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
{% extends "interface/project_base.html" %}
|
||||
|
||||
{% block page %}
|
||||
<div class="narrow">
|
||||
<h3>Link to cloud storage</h3>
|
||||
<p>Please paste the full link from your storage provider</p>
|
||||
</div>
|
||||
<div>
|
||||
<form class="vertical" action="" method="POST" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
{{ form }}
|
||||
<div class="form-actions">
|
||||
<a href="{{ cancel_url }}">Cancel</a>
|
||||
<button type="submit" class="btn-primary">Continue</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -16,7 +16,7 @@
|
||||
<td>{{ submission.instrument }}</td>
|
||||
<td>
|
||||
<a href="{% url 'submission_detail' project=project.pk pk=submission.pk %}"><i class="fas fa-info-circle"></i></a>
|
||||
<a href="{{ submission.presigned_url }}"><i class="fas fa-download"></i></a>
|
||||
<a href="{{ submission.download_url }}" target="_blank" rel="noopener noreferrer"><i class="fas fa-download"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user