1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2025-06-20 08:35:17 +00:00

Start to process user account image

This commit is contained in:
2019-11-23 16:10:51 +01:00
parent 1ff0a72b70
commit b6294870ce
7 changed files with 179 additions and 4 deletions

View File

@ -0,0 +1,22 @@
import { conf } from "../helpers/ConfigHelper";
import { join } from "path";
/**
* User data utilities
*
* @author Pierre HUBERT
*/
/**
* Get and returns the URL path to an userdata file
*
* @param uri Optionnal, defines the URI pointing on the file
* @param sysPath Optionnal, defines if system path is required instead of URL
* @return The full URL to the userdata file
*/
export function pathUserData(uri: string = "", sysPath: boolean = false) : string {
if(!sysPath)
return join(conf().storageURL, uri);
else
return join(conf().storagePath, uri);
}