Improve upload handling (server-side and UI).

This commit is contained in:
Bart Kamphorst
2018-11-07 11:06:25 +01:00
parent 6857995442
commit 64c4ee9c05
13 changed files with 65 additions and 43 deletions
+9 -5
View File
@@ -15,11 +15,15 @@
<![endif]-->
<script>
var baseUrl = '{{base_url}}';
var uploadDest = '{{upload_dest}}';
{{#page}}
var pageFullPath = '{{url_path}}';
{{/page}}
var baseUrl = '{{base_url}}';
var uploadDest = 'uploads';
var perPageUploads = '{{per_page_uploads}}';
if (perPageUploads == 'true') {
uploadDest = uploadDest + window.location.pathname.replace(/.*gollum\/\w+\//, "/").replace(/\.[^/.]+$/, "")
}
{{#page}}
var pageFullPath = '{{url_path}}';
{{/page}}
</script>
{{#sprockets_javascript_tag}}app{{/sprockets_javascript_tag}}
{{#use_identicon}}