HTML5 File Upload Support Product Page
Under investigation
Insert not storing updated file name
Reported 8 years ago
1
has this problem
8 years ago Brad Lawryk posted:
I have a simple upload form that uploads a file and stores the information in a database. It does rename the file according to the renaming template I have set up. And it does insert the record in the database like it is suppose to but it stores the original file name in the database.
I can't for the life of me get it to store the renamed file name in the database. If it matters, these are all document files. No images or anything like that. Mostly Word or PDF.
Replies
Replied 8 years ago
8 years ago Teodor Kuduschiev replied:
Hi Brad,
If you are using the {{$_POST.FileField.name}} for the name value, it should store the renamed filename, not the original one.
Please send us a link to your page to support@dmxzone.com and enable the output option for the insert and upload steps.
If you are using the {{$_POST.FileField.name}} for the name value, it should store the renamed filename, not the original one.
Please send us a link to your page to support@dmxzone.com and enable the output option for the insert and upload steps.
Replied 8 years ago
8 years ago Brad Lawryk replied:
I was able to solve this today.
Seems that {guid}{name}{_n}{ext} does not work when adding to a database. It renames the file fine but only writes the original file name to the database.
I changed it to {guid}{name}{ext} and it works fine now.
Seems that {guid}{name}{_n}{ext} does not work when adding to a database. It renames the file fine but only writes the original file name to the database.
I changed it to {guid}{name}{ext} and it works fine now.
Replied 8 years ago
8 years ago Teodor Kuduschiev replied:
Hi Brad,
I will check if there is an issue with the {_n} mask and will let you know.
I will check if there is an issue with the {_n} mask and will let you know.
Replied 8 years ago
8 years ago Brad Lawryk replied:
Yeah, it seems that way as I can replicate it by putting it back in.
Anyways, with the {guid} in the template it shouldn't really need the {_n} anyways. ;-)
Anyways, with the {guid} in the template it shouldn't really need the {_n} anyways. ;-)
Replied 8 years ago
8 years ago Teodor Kuduschiev replied:
Actually the {_n} mask is not really needed if the overwrite checkbox is not checked, as the extension automatically puts "_1"..."_99" if the filename is the same.