From 5b9b4b884a78d47b66c883d5b8db289c595e0f23 Mon Sep 17 00:00:00 2001 From: "Jeremy B. Merrill" Date: Sun, 25 Nov 2018 16:47:32 -0500 Subject: [PATCH] use tag for uploads/queues, fixing uploads under relative path --- webapp/index.html | 2 +- webapp/static/js/library.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/webapp/index.html b/webapp/index.html index b73b9d7a..c650f4b3 100644 --- a/webapp/index.html +++ b/webapp/index.html @@ -289,7 +289,7 @@

Upload Progress

Import one or more PDFs

-
+
diff --git a/webapp/static/js/library.js b/webapp/static/js/library.js index d7e0fb47..5a15c42e 100644 --- a/webapp/static/js/library.js +++ b/webapp/static/js/library.js @@ -1,4 +1,5 @@ Tabula = window.Tabula || {}; +var base_uri = $('base').attr("href"); Tabula.FileUpload = Backbone.Model.extend({ // isOneOfMultiple: @@ -19,7 +20,7 @@ Tabula.FileUpload = Backbone.Model.extend({ }else{ $.ajax({ dataType: 'json', - url: '/queue/'+this.get('upload_id')+'/json?file_id=' + this.get('file_id'), + url: (base_uri || '/') + 'queue/'+this.get('upload_id')+'/json?file_id=' + this.get('file_id'), success: _.bind(function(data, status, xhr) { if( (data.message.length && data.message != "complete") || data.pct_complete == 100 ){ this.set('message', data.message);