Forum .LRN Q&A: File storage archive download

Collapse
Posted by Malte Sussdorff on
Is there a reason that the default file storage archive download still is a .tgz archive instead of a ZIP one? This is confusing for users and you have to change it to .zip all the time manually.

Could we change the default to ZIP?

Collapse
Posted by Malte Sussdorff on
Note that we need to have "ZIP" installed anyway due to the fact that we allow unzipping files which user uploads. And it basicly brings uploading and downloading out of sync (you should upload a ZIP file but you will download a .tgz file).
Collapse
Posted by Malte Sussdorff on
The change in file storage would be to set the default for AchiveCommand to "/usr/bin/zip -r {out_file} {in_file}", change the ArchiveExtension to ".zip", change the unzip binary to "/usr/bin/unzip" and add "zip / unzip" to the list of required software (optional) upon installation of OpenACS.
Collapse
Posted by Malte Sussdorff on
And here is a script to upgrade:

update apm_parameters set default_value = 'zip' where parameter_name = 'ArchiveExtension';
update apm_parameters set default_value = '/usr/bin/zip -r {out_file} {in_file}' where parameter_name = 'ArchiveCommand';
update apm_parameter_values set attr_value = '/usr/bin/zip -r {out_file} {in_file}' where parameter_id = (select parameter_id from apm_parameters where parameter_name = 'ArchiveExtension');
update apm_parameter_values set attr_value = 'zip' where parameter_id = (select parameter_id from apm_parameters where parameter_name = 'ArchiveCommand');

Collapse
Posted by Dave Bauer on
Hi Malte,

I thought I had fixed that ages ago. You are right, now user knows what to do with a tgz file anyway.

Collapse
Posted by Malte Sussdorff on
Well, you did not. should it be committed then ?
Collapse
Posted by Emmanuelle Raffenne on
IMO, it should be committed.

Thanks Malte.