An undertaking together with any affidavit required by this article shall be filed with the clerk of the court in which the action is triable, or, upon an appeal, in the office where the judgment or order of the court of original instance is entered, and a copy shall be served upon the adverse party. The undertaking is effective when so served and filed.
N.Y. CPLR 2505