|
@@ -74,11 +74,11 @@ class FilesService extends Service {
|
|
|
const index = filename.indexOf('.');
|
|
|
const fileType = filename.slice(index, filename.length);
|
|
|
const uuid = uuidv1();
|
|
|
- // const filepath = `/filespath/${type === 'files' ? 'files' : 'resource'}/${uuid}${fileType}`;
|
|
|
- // const paths = path.join(`${this.app.config.filespath}${filepath}`);
|
|
|
+ const filepath = `/filespath/${type === 'files' ? 'files' : 'resource'}/${uuid}${fileType}`;
|
|
|
+ const paths = path.join(`${this.app.config.filespath}${filepath}`);
|
|
|
|
|
|
- const filepath = `/public/${type === 'files' ? 'files' : 'resource'}/${uuid}${fileType}`;
|
|
|
- const paths = path.join(this.app.baseDir, `/app${filepath}`);
|
|
|
+ // const filepath = `/public/${type === 'files' ? 'files' : 'resource'}/${uuid}${fileType}`;
|
|
|
+ // const paths = path.join(this.app.baseDir, `/app${filepath}`);
|
|
|
// 存储
|
|
|
const result = await new Promise((resolve, reject) => {
|
|
|
const remoteFileStream = fs.createWriteStream(paths);
|