A file transmission method, applied to a first electronic device, comprising: detecting whether an automatic file transmission condition is satisfied by a connection between the first electronic device and a second electronic device to obtain a first detection result; and when the first detection result is used for representing that the automatic file transmission condition is satisfied, selecting a first file having a preset file attribute and transmitting the first file, characterized in that, when the first detection result is used for representing that the automatic file transmission condition is satisfied, the method further comprises: detecting whether first hardware of the first electronic device is in a preset first state used for starting file transmission to obtain a second detection result; and when the second detection result is used for representing that the first hardware is in the first state, selecting the first file having the preset file attribute and transmitting the first file, such that the first file is started to be transmitted between the first electronic device and the second electronic device; or receiving a third detection result sent by the second electronic device, wherein the third detection result is used for representing that second hardware of the second electronic device is in a preset second state used for starting file transmission; and after receiving the third detection result, selecting the first file having the preset file attribute, such that the first file is started to be transmitted between the first electronic device and the second electronic device. detecting whether an automatic file transmission condition is satisfied by a connection between the first electronic device and a second electronic device to obtain a first detection result; and when the first detection result is used for representing that the automatic file transmission condition is satisfied, selecting a first file having a preset file attribute and transmitting the first file, characterized in that, when the first detection result is used for representing that the automatic file transmission condition is satisfied, the method further comprises: detecting whether first hardware of the first electronic device is in a preset first state used for starting file transmission to obtain a second detection result; and when the second detection result is used for representing that the first hardware is in the first state, selecting the first file having the preset file attribute and transmitting the first file, such that the first file is started to be transmitted between the first electronic device and the second electronic device; or receiving a third detection result sent by the second electronic device, wherein the third detection result is used for representing that second hardware of the second electronic device is in a preset second state used for starting file transmission; and after receiving the third detection result, selecting the first file having the preset file attribute, such that the first file is started to be transmitted between the first electronic device and the second electronic device. detecting whether first hardware of the first electronic device is in a preset first state used for starting file transmission to obtain a second detection result; and when the second detection result is used for representing that the first hardware is in the first state, selecting the first file having the preset file attribute and transmitting the first file, such that the first file is started to be transmitted between the first electronic device and the second electronic device; or receiving a third detection result sent by the second electronic device, wherein the third detection result is used for representing that second hardware of the second electronic device is in a preset second state used for starting file transmission; and after receiving the third detection result, selecting the first file having the preset file attribute, such that the first file is started to be transmitted between the first electronic device and the second electronic device.