In the cases in which defendant may be admitted to bail upon an appeal, the order admitting him to bail may be made by any Magistrate having the power to issue a writ of habeas corpus, or by the Magistrate before whom the trial was had.
Ca. Pen. Code § 1291