摘要 |
The present invention provides a file sharing method and apparatus, to solve a problem in the prior art that a process is cumbersome and inefficient because a file that has already been saved needs to be changed when a file is shared by using a cloud server. The method includes: uploading, by a first terminal, each encrypted file to a server for saving, and receiving a uniform resource locator (URL) that is returned by the server and corresponds to a location for saving each encrypted file; generating a key package that includes a shared key and a URL that correspond to a file to be shared; and providing the key package for a second terminal, so that the second terminal acquires a corresponding encrypted file by using the URL in the key package, and decrypts the acquired encrypted file by using the shared key in the key package. By using the foregoing method, during file sharing, the first terminal does not need to change a file that has already been saved on the server, so that a process is simple and file sharing efficiency can be effectively improved. |