import * as path from 'path';
import * as url from 'url';
const savePath = path.join('public', 'images', 'a.jpg');
// => \public\images\a.jpg
const urlPath = url.parse(savePath).path;
// => /public/images/a.jpg
相关文章
- 10-11388. Longest Absolute File Path
- 10-11poetry install报错,提示“relative path can‘t be expressed as a file URI”
- 10-11eclipse ----class path resource [ssm/consumer/mapper/] cannot be resolved to URL because it does no
- 10-11flask中的static_path和static_path_url和static_folder
- 10-11flutter Cannot open file, path = ‘.../test.jpg‘ (OS Error: Permission denied, errno = 13)
- 10-11scan returned empty file list; check that path exists and contains files in scope of configuration
- 10-11[百度空间] ld: add library file reference by path & file name
- 10-11Maven项目启动失败:class path resource [spring/] cannot be resolved to URL because it does not exist
- 10-11[Circular view path [abc]: would dispatch back to the current handler URL
- 10-11(转)VSCode调试go语言出现:exec: "gcc": executable file not found in %PATH%