Change File Entity metadata like the download as name.

changeFileMetaData(entity, downloadAs=NA, contentType=NA, forceVersion=TRUE, name=NA)

Arguments

entity

Synapse entity Id or object.

downloadAs

Specify filename to change the filename of a filehandle. Defaults to NA.

contentType

Specify content type to change the content type of a filehandle. Defaults to NA.

forceVersion

Indicates whether the method should increment the version of the object even if nothing has changed. Defaults to TRUE.

name

Specify filename to change the filename of the file. Defaults to NA.

Details

Value

Synapse Entity

References

Note

See also

Examples

  if (FALSE) {
    changeFileMetaData("syn123", downloadAs="index.html", contentType="text")
    
    # Can be used to change the filename, the filename when the file is downloaded,
    # or the file content-type without downloading
    changeFileMetaData("syn123", downloadAs="my_new_downloadAs_name_file.txt", name="my_new_name_file.txt")
  }