make it safe to call attachData without a callback on the client, unless we are attaching a URL; in that case, an error is thrown if no callback