H
H
Hellas2016-08-21 10:34:05
JavaScript
Hellas, 2016-08-21 10:34:05

How not to upload a file to the server if a file with the same size is found?

Users have the ability to upload files. It is necessary to check on the server if there is a file with the same size, and if so, give the user a link to the old file, instead of downloading a new one, exactly the same.
Is there a ready-made solution for such tasks?
Toster seems to use a similar file upload system.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Golubkov, 2016-08-21
@Hellas

It is possible to try to keep the table, with fields a name of a file, the size, hash, the link.
When loading, check with a request whether there is such a file in the database, if it is, then issue a link, if not, then download and write the file data to the database

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question