Implemented Add a version to file archive name

More
1 year 1 month ago #2433 by Dmitrijs Rekuns
Add a version to file archive name was created by Dmitrijs Rekuns
Hello!

It would be good to have an option to automatically add a file version to archive name.

Another option for us would be to create a plugin, but... As I can see Download::fileInformation() does not include info about the version  
So onFileBeforeDownload is not useful for me to create a plugin.

Best regards,
Dmitrijs
The topic has been locked.
More
1 year 1 month ago #2435 by Ruud van Lent
Replied by Ruud van Lent on topic Add a version to file archive name
Hi,
this makes sense.
Let me think this one through to see when I add the version to the filename  (always) if something might break / what the consequences are.

Will also look into why version number is not in the file info.
The topic has been locked.
More
1 year 1 month ago - 1 year 1 month ago #2436 by Ruud van Lent
Replied by Ruud van Lent on topic Add a version to file archive name
so had a quick look into this and actually this is already possible.
when you configure the file to 'Use Your Own Filename' = No, it will take the alias as filename.

so when you create a file name 'test' and set the alias to test-1-2-3, then the file that is downloaded will be named test-1-2-3.zip (extension is dependent on extension of uploaded file)
That is also the way I am doing it. (Been doing it from the start so was not aware I was doing it hahahah)

Can you reflect on this?

As for the onFileBeforeDownload, I will expose the version here as well (in next version)
Last edit: 1 year 1 month ago by Ruud van Lent.
The topic has been locked.
More
1 year 1 month ago #2437 by Dmitrijs Rekuns
Replied by Dmitrijs Rekuns on topic Add a version to file archive name
Yeah I know it, but the idea to have it automated :) If the version will be available for the plugins then that will be a piece of cake to automate :) Will wait for a new version with this small feature.
The topic has been locked.
More
1 year 1 month ago #2440 by Ruud van Lent
Replied by Ruud van Lent on topic Add a version to file archive name
I have a new version in test now, with this changes in it.
Currently testing a new feature (caching of update xml  files): I have a customer who has my extensions on over 100 servers installed and he has his own system of updating them. This means that when he hits the update button, 100+ servers visit my server to get the update XML files. And because that basically is a DDOS: my server load gets very high, which makes him hit the button again, because it is 'not working', and again and again.
Today I had 1000+ requests that basically made my server unresponsive.
So now I have added caching on the update XML files so they do not need to be regenerated every time. When this works correct (tomorrow I will know when he hits the button again) I will be rolling out a new version.
fingers crossed :)
 
The topic has been locked.
More
1 year 1 month ago #2444 by Ruud van Lent
Replied by Ruud van Lent on topic Add a version to file archive name
Just release v3.8.0 which addresses this issue / request. Closing this topic now.
When you have a new / follow up issue / request feel free to open a new topic.
The topic has been locked.