Insert cloud location for all documents automatically

Hi :slight_smile:

I do not know if I post in the right section. In this case could you move it in the fitted section.

We are french and let is train an association under the 1901 law in the aim of reach food autonomy. Our web hosting provider is Framasoft a french popular education association under the 1901 law too which housing a NextCloud technology with a Collabora suite.

As far as I am concerned I am a simple volunteer participant in the collective.


We store our documents in a cloud tree, and I asked to myself if it can be possible to auto insert the location in all documents (for example from header or footer) because it will be more comfortable to find it.

I discovered we can insert a file location field (Document > File name > Path/File name) but when I did it I stared it is the temporarily real system location like/tmp/user/docs/<alphanum_string>/260114.odt which is usefulness and do not indicates the document is in ODJ & CR / COORDO / CR / 260114.odt cloud tree.

I suppose it is possible to modify this behaviour, and/or add a new custom field and/or modify the default template and/or execute a macro which do the same.

I am awareness of this possibility, but for this moment I do not administrate nor the NextCloud configuration, nor the Collabora configuration. What I wish is to have the simplest way to indicate how to achieve this to our tool administrator or assist her/him.

Is it easily possible for now in our scope ? Or will we do contact our Framasoft provider ?

Here is our NextCloud/Collabora version information :

COOLWSD version: 25.04.7.3(git hash: a0576a3364)
LOKit version: Collabora Office 25.04.7.3(git hash: 4ad7ba3245)
Served by: unknown
Server ID: d4e2c7a1
WOPI host: nextcloud 31.0.9.1 - richdocuments 8.7.5


Thank you in advance for the time you will spend to help us.

With adelphity :slight_smile:

lnj

Nobody can help me ? Too complicated ? My request is not clear enough ? Bad forum ? Not patient enough, the answer will come soon ?

hi @lenainjaune Sorry for late reply. I am finding solution here give me few min i will revert back to you ASAP

Thanks
Darshan

Cool … no problem :grinning_face_with_smiling_eyes: !

Take your time there is no urgency but just I wanted to verify if I posted in the right place and if I could expect a response :wink:

hi @lenainjaune

Short answer first

No, it is not easily possible today to automatically insert the logical Nextcloud folder path (for example
ODJ & CR / COORDO / CR / 260114.odt) into documents via headers, footers, fields, templates, or macros in Collabora Online.

Why the built-in “File path” field does not work

You already found the right feature in LibreOffice / Collabora:

Document → Field → File name → Path/File name

This field shows the local filesystem path on the Collabora server, not the cloud path.

This happens because:

  • Collabora Online edits a temporary local copy of the file
  • That copy lives in /tmp/... on the Collabora server
  • The real Nextcloud path is not known to LibreOffice core
  • WOPI (the protocol between Nextcloud and Collabora) does not expose the logical folder tree as a document property

So the behaviour you observed is correct and unavoidable at the moment.

What you are seeing (/tmp/user/docs/<random>/260114.odt) is expected behaviour and not configurable from the document side.

Should you contact Framasoft?

You can, but mainly to confirm the limitation,

In short :slightly_smiling_face:

  • The Nextcloud folder path cannot be inserted automatically into documents in Collabora Online.

  • The “File path” field shows a temporary /tmp/... server path and this is expected.

  • There is no setting, template, or macro that can change this today.

  • This would require new functionality in Nextcloud / Collabora / WOPI.

  • The only practical workaround now is:

    • a manual custom field (metadata), or
    • a naming convention.
1 Like

Thank you for your help and your detailed answer :wink: .

The node’s problem seems to me very clear.

Yeah but usefulness for the user …

Then we will emphasise that we must do it manually in a procedure.

That is a shame, it would have been useful. Have you considered implementing it soon ?

@lenainjaune I can’t commit this feature myself, but it would be helpful if you could open an issue on GitHub so the developers, team, and community can see it. This way it can be considered for upstream once resources are available after current tasks.

Thanks,
Darshan

I read again this :

as a workaround. I am not sure to really understand.

We can build a custom field which retrieve the cloud location ? In the case, how to build this field ? Syntax ?

OK I will open an issue as far as possible, if the custom field is not possible.