Difference between 'id' and 'fileid' in WebDAV

Does anyone know the difference between these two properties (WebDAV) in Nextcloud? :thinking:

  • {http://owncloud.org/ns}id The fileid namespaced by the instance id, globally unique
  • {http://owncloud.org/ns}fileid The unique id for the file within the instance

I guess what I’m asking is “globally unique” vs “unique for the file within the instance”?

so in your config/config.php you have an “instanceid”, e.g. ocrb3ervk02w in my def enviroment.

The fileid is the number in the oc_filecache table. So the file that has fileid = 12345 there will have:

  • {http://owncloud.org/ns}id set to 00012345ocrb3ervk02w (fileid with padding zeros to be at least 8 numberes)
  • {http://owncloud.org/ns}fileid set to 12345
2 Likes

Thank you for a clear answer! So, assuming I have some way to identify the instance, either by “instanceid”, or by other means, the fileid is sufficient to uniquely identify a file for a Nextcloud instance/site/installation?

yes, fileid is an autoincrement column in the database. after deleting a file it will not be reused for the next new one.

1 Like