Skip to content
Snippets Groups Projects
Commit 8bdda192 authored by Timothee P's avatar Timothee P :sunflower:
Browse files

Merge branch 'initialize_pwa' of git.neogeo.fr:geocontrib/geocontrib-frontend into initialize_pwa

parents 930d8b60 5c069053
No related branches found
No related tags found
No related merge requests found
......@@ -464,10 +464,10 @@ export default {
//console.log("POST comment", data);
},
getAttachmentFileData(evt) {
const input = evt.target.value;
const period = input.lastIndexOf(".");
const fileName = input.substring(0, period);
const fileExtension = input.substring(period + 1);
const files = evt.target.files || evt.dataTransfer.files;
const period = files[0].name.lastIndexOf(".");
const fileName = files[0].name.substring(0, period)
const fileExtension = files[0].name.substring(period + 1);
const shortName = fileName.slice(0, 10) + "[...]." + fileExtension;
this.comment_form.attachment_file.value = shortName;
this.comment_form.title.value = shortName;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment