The invention relates to a method and a system for uploading files. The method includes that a user selects files to be uploaded and submits hashed value of the files to be uploaded. A request for file uploading and based on HTTPOST is sent to a server. File type of the files to be uploaded is judged, the next step is conducted on yes judgment, and failure warning is returned to the user to finish uploading on no judgment. The method further includes recognizing content of the files to the uploaded, reminding the user that identical files exist, returning pre-existing file address and finishing uploading if identical files exist in the server, starting uploading if no identical files exist in the server, calculating the hashed value of the uploaded files, comparing the hashed value with submitted hashed value, reminding that file uploading succeeds, returning the file address to the user and finishing uploading if the values are identical, and returning the uploading failure warning and finishing uploading if the values are not identical. The method and the system resolve the problems of synonym file re-uploading, file type judgment, file verification and the like.