summaryrefslogtreecommitdiff
path: root/client/vendor/paths.js
blob: 14c35b1349d4811d91f66045ba46be4ab35fea59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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,
}