How attach files without tempblob record?

I have an extension to attach files into a record, and of course, withe the new version I get the error, and the solutons proposed:
Error: Argument 1: cannot convert from 'Record TempBlob' to 'var Codeunit "Temp Blob"' Solution: Use codeunit 4100 "Temp Blob" API instead of the record API.

Im' trying to find the solution, but I don't get any. I've found this:
But they use the tempblob record, so I can't use that.
I've openned the baseApp to see how it's done inthe standard, but I cannot use that way either:

Which is the corerct way to create a extension for cloud in the latest release to attach files?
Thank you very much!