Solution-synthesized organic and inorganic semiconductors have recently received much attention for their applications in optoelectronic devices operating in the visible and near-infrared spectral regions. Here, we fabricate a photovoltaic detector architecture by use of hybrid metal halide perovskite film with selected cathode buffer layers. This device effectively converts the photons to current both in visible spectral range and in X rays. It is found that the device exhibits excellent performances with a transient response time as fast as 660 ns. In addition, we achieve an X-ray sensitivity up to 30 μC Gy-1 cm-2 for the hybrid perovskite photodetector. Thanks to the advantages of the device, such as the mechanical flexibility, low-cost and easy preparation, such photodetector based on solution-synthesized perovskite film is promising for photon detection in a wide spectral range.