management/front/dkha-web-sz-main/node_modules/tempfile/index.js

10 lines
225 B
JavaScript
Raw Normal View History

2023-12-18 13:12:25 +08:00
'use strict';
var path = require('path');
var os = require('os');
var tmpdir = (os.tmpdir || os.tmpDir)();
var uuid = require('uuid');
module.exports = function (ext) {
return path.join(tmpdir, uuid.v4() + (ext || ''));
};