SAFE NFS file meta data

The NFS API docs have several functions related to file metadata which I’ve ignored because at some point I think it was stated these were not implemented.

@frabrunelle can you confirm that the following features are/are not implemented:

Get file metadata
Update file metadata

Also, the Create file endpoint has Content-Type in the POST header, and Get file is shown to return Content-Type in the response headers.

I’m not seeing any way to do this in safe-js, or to receive Content-Type (or other response header information) when doing safeNFS.getFile() which is what I want and really why I’m asking for clarification here.

I looked in the safe-js polyfill and no sign get/update file metadata, which is why I’m thinking this may all be not implemented yet in which case it would be good to note this in the API docs.

@joshuef If the NFS API does implement this, and in particular if Content-Type is available in the safeNFS.getFile() response it would be good to get access to it.

1 Like

yes, these features are implemented in SAFE Launcher.

looks like update file metadata is called “rename file”: safe-js/src/nfs.js at master · joshuef/safe-js · GitHub

EDIT: get file metadata has been implemented: safe-js/src/nfs.js at master · joshuef/safe-js · GitHub

2 Likes

Yup, should be in there.

Good catch and thanks for opening the issue :smiley:

Coming to a safe-js near you soon!

1 Like