How would you recommend to delete a .stream in a REST Service?
Hello, first of all thanks for your time reading this question,
We would need some help, we would need to delete a %GlobalBinaryStream which is a variable called "pOutput" which is being sent from a REST Service to POSTMAN
Currently we have tried:
set pOutput = ##class(%GlobalBinaryStream).%New()
//set pOutput = msg
while(msg.AtEnd=0){
do pOutput.Write(msg.Read())
}
do msg.Clear()
Quit $$$OK
do pOutput.Clear()
$$$LOGWARNING("Despues de borrar en el Servicio: pOutput.Clear()")
As you would notice, we are currently clearing msg, however how could we remove "pOutput"?
We need to keep pOutput because is the variable which holds the pdf being returned from the REST Service to the POSTMAN
However we also need to delete its contents to remove the .stream file being store in /opt/ensemble/[namespace]/stream
➡️ How would you recommend to handle this task?
💭Thanks in advance for your help and time,
We have also read:
https://community.intersystems.com/post/delete-records-streamfilebinary-...
https://community.intersystems.com/post/stream-files-stored-server-when-...
Thanks for your replies and suggestion