How to attach file to thing if thing doesn't exist already?

Yeah, found another method but not sure if you’ll find it useful