Returning data in file type from plugin action

Hey all,
I’m writing a simple pdf filler plugin and the API I’m using returns the resulting pdf in binary data format. I’m having issues figuring out how I can convert that pdf to a file URL so that I can return the result in bubble’s “file” data type. Does anyone know of best practices for doing something like this?