Fixed URI encoding.

master
Sander Vocke 6 years ago
parent d16f03c885
commit 0a948f8561
  1. 4
      src/queries.js

@ -19,8 +19,8 @@ export function do_image_query(query, database, collection_path, collection_thum
var cols = res[0].columns;
var data = res[0].values;
data.forEach(row => {
var imagepath = process.env.PUBLIC_URL + collection_path + "/" + row[cols.indexOf("relativePath")] + "/" + row[cols.indexOf("name")];
var thumbpath = process.env.PUBLIC_URL + collection_thumbs_path + "/" + row[cols.indexOf("uniqueHash")] + ".jpg";
var imagepath = encodeURI(collection_path + "/" + row[cols.indexOf("relativePath")] + "/" + row[cols.indexOf("name")]);
var thumbpath = encodeURI(collection_thumbs_path + "/" + row[cols.indexOf("uniqueHash")] + ".jpg");
photos.push(
create_photo(
row[cols.indexOf("id")],

Loading…
Cancel
Save