Closed TAINCER closed 2 years ago
I think this happens since #27
Looking at my code it will probably not only filter out trailing dots, but also leading dots.
Since leading dots are very common, I'll come up with a fix for my fix :P
And we could also consider adding an option to force saving it with the original filename, what do you think @hgouveia?
Hey @TAINCER , it seems @Chaphasilor will take care of this, in the meantime i suggest you use the filename callback, so you can control the naming
const dl = new DownloaderHelper(
'https://files.taincer.com/testdata/.changelog.txt',
__dirname,
{
override: true,
fileName: (fileName, filePath, contentType) => fileName
}
);
@Chaphasilor please go ahead
fixed on #59
When downloading a file with a dot prefix the actual file that is saved doesn't include the dot. Is there a way to disable this behavior? For my case, I need 1:1 the file names from the server on the local Disc.
Demo Code: