Imported Motoko canister has wrong type, [Nat8] instead of Blob

In Candid, blob is just an abbreviation for vec nat8 (but not in Motoko).

You can convert the data to an array if you don’t mind the expense (Blob.toArray(data)).

Another hacky workaround would be to cast Foo to another actor type that has the blob method. It should work, is gross, but cheaper than the array conversion.

Something like

{
   let foo = actor (Principal.toText(Principal.fromActor(Foo))) : actor { add : Blob -> () } 
   foo.add(data);
}