We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d9c4ff3 commit a2566faCopy full SHA for a2566fa
1 file changed
apps/files/src/views/TemplatePicker.vue
@@ -199,12 +199,11 @@ export default {
199
const currentDirectory = getCurrentDirectory()
200
const fileList = OCA?.Files?.App?.currentFileList
201
202
- try {
203
- const response = await axios.post(generateOcsUrl('apps/files/api/v1/templates', 2) + 'create', {
204
- filePath: `${currentDirectory}/${this.name}`,
205
- templatePath: this.selectedTemplate?.filename,
206
- templateType: this.selectedTemplate?.templateType,
207
- })
+ // If the file doesn't have an extension, add the default one
+ if (this.nameWithoutExt === this.name) {
+ this.logger.debug('Fixed invalid filename', { name: this.name, extension: this.provider?.extension })
+ this.name = this.name + this.provider?.extension
+ }
208
209
try {
210
const fileInfo = await createFromTemplate(
0 commit comments