High-magnetic-field critical currents in thin films of YBa2Cu3O7