I've trying to add current date and time in filename:
[FileUploadEditor(FilenameFormat = "PurchaseRequest/{1:0000}/{0:00000000}_{2}_{3}_{4}", CopyToHistory = true, OriginalNameProperty = "ScanPrName", DisplayFileName = true)]
An error occured:
The given path's format is not supported.
Anyone here face same issue?
colon in file name not allowed
As @Zahar661 mentioned. Therefore you have to replace the ":" with for example "-".
@Zahar661 , @JohnRanger
The colon is allowed filename format

I refer the filename from this link:
https://github.com/volkanceylan/Serenity-Blog/blob/master/2017-11-02-upload-file-name-formats.md

No - it is not - at least not under Windows. See above Screenshot from when I tried to type a colon (":").
With kind regards,
John
You have to test how far your path string works - e.g. does
ProductImage/{1:0000}/{0:0000}
work?
If yes, try:
ProductImage/{1:0000}/{0:0000}_{2}
If this does not work anymore, there must be an invalid character within {2}.
Compare {2} with the un-allowed characters in my above post.
If it still works with {2} added, continue to test with {3} added - and so forth.
With kind regards,
John
You have to provide a custom date format string for the 3rd argument, like
{3:yyyyMMddHHmmss} or {3:yyyy-MM-dd_HH-mm-ss}
BTW, the format is applied in UploadHelper.FormatDbFileName()
The default conversion from DateTime.Now produces characters not allowed in filenames (i.e. colon)
Exactly what I need. Thank you @hannesb :+1:
Most helpful comment
You have to provide a custom date format string for the 3rd argument, like
{3:yyyyMMddHHmmss} or {3:yyyy-MM-dd_HH-mm-ss}
BTW, the format is applied in UploadHelper.FormatDbFileName()
The default conversion from DateTime.Now produces characters not allowed in filenames (i.e. colon)