From d41070c7b00fafc974a1a6e7b6d1b42391fa57ed Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 21 Jul 2017 04:48:52 +0200 Subject: all async paths working --- client/vendor/paths.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 client/vendor/paths.js (limited to 'client/vendor/paths.js') diff --git a/client/vendor/paths.js b/client/vendor/paths.js new file mode 100644 index 0000000..14c35b1 --- /dev/null +++ b/client/vendor/paths.js @@ -0,0 +1,18 @@ +function filepath (file) { + return '/data/' + file.folder_id + '/' + encodeURIComponent(file.name) +} +function mp3path (file) { + if (file.mime !== 'audio/mp3') { + return filepath(file) + '.mp3' + } + return filepath(file) +} +function pngpath (file) { + return filepath(file) + '.png' +} + +export { + filepath, + mp3path, + pngpath, +} \ No newline at end of file -- cgit v1.2.3-70-g09d2