The invention discloses
file transfer method and device. The method includes following steps: 1, sending a
file transfer request to a
server by a
client side; 2, receiving and responding to the request by the
server; 3, receiving response results by the
client side, judging whether the
server accepts the request or not, if yes, executing step 4; if not, executing step 5; 4, judging whether a file is larger than 100M or not, if yes, transferring in a
multithreading manner; if not, transferring in a single-thread
file transfer manner; and 5, finishing transfer of the request of the
client side, wherein transfer includes uploading and downloading. By the file transfer method and device, when the file is large, the
multithreading transfer mode is adopted, so that a CPU (
central processing unit) can be utilized to the greatest extent; when the file is small, the single-thread
transfer mode is adopted, so that overmuch time consumed during switching among threads can be avoided; by adopting the different transfer
modes according to different sizes of the file, file
transfer efficiency of the whole file transfer method and the transfer device can be improved.