grist-core icon indicating copy to clipboard operation
grist-core copied to clipboard

Feat: add env var to add context (workspace and organization) to exported filename

Open CamilleLegeron opened this issue 11 months ago • 2 comments

Resolves https://github.com/gristlabs/grist-core/issues/347

CamilleLegeron avatar Feb 27 '24 16:02 CamilleLegeron

Can you provide a bit of context in the PR description? It would ease the review :)

(For example, is there a need behind? Or even an issue that would be solved?)

fflorent avatar Feb 27 '24 16:02 fflorent

But I feel like the real need is just to be able to disambiguate the name of files downloaded by automated tools (I may be wrong though).

Yes but not only, I understood that is for downloading from de Grist frontend too. That is right @vviers ? So, a solution using a query parameter will not be sufficient for this case.

CamilleLegeron avatar Feb 28 '24 08:02 CamilleLegeron

After a conversation, the need was more technical and add the title query param seems to be enough

CamilleLegeron avatar Mar 05 '24 11:03 CamilleLegeron

@fflorent

I just noticed that the title param cannot be used alone when exporting to xlsx (/api/docs/:docId/download/xlsx): the endpoint requires a tableId to be passed in params. Otherwise I get this error: tableId parameter should be a string: undefined

I think it's out of the scope, when you're exporting a xlsx it's corresponding in fact to a table and not all the doc, so it's need the tableId independently of the title param

CamilleLegeron avatar Mar 05 '24 14:03 CamilleLegeron

@CamilleLegeron

I think it's out of the scope, when you're exporting a xlsx it's corresponding in fact to a table and not all the doc, so it's need the tableId independently of the title param

I achieve exporting an Excel document with all the tables:

https://github.com/gristlabs/grist-core/assets/371705/9f6ec607-8f05-487e-a179-84b6f6eaf149

fflorent avatar Mar 05 '24 14:03 fflorent

@fflorent well seen thanks !

CamilleLegeron avatar Mar 05 '24 15:03 CamilleLegeron