Hi, I would like to write an ontology edit function that modifies the path of an uploaded file.
export class File_upload {
@OntologyEditFunction()
@Edits(QcTransaction)
public async uploadFile(uploadedFile: MediaItem): Promise<void> {
const data = await uploadedFile.getMetadataAsync();
const originalPath = (data as IMediaItemInfo).path;
const path = `DOCUMENT/${originalPath}`;
// TODO: Change the path of the uploaded file
console.log(path);
}
}
Is this possible? Alternatively, is there any way to change a document’s path after it has already been added to a media set?