M
M
madaraice2018-07-19 00:36:13
PHP
madaraice, 2018-07-19 00:36:13

Simple file hosting: storing and issuing files, how best to implement?

I am making a simple file hosting service that will be used by about 50-100 people (if this clarification affects something) or even if no one will use it, so that it would not be a shame to put it on github and use it as one of the projects for the portfolio.
I don’t know how to correctly implement the storage of files and their issuance to the user: when a file is uploaded, it is moved to a separate folder and stored there for n number of days, then a link to download this file is entered into the database.
To get a file, the user enters a link, the database checks whether there is a link to this file, and if successful, the file is returned else nothing happens.
Am I thinking right? Or can it be implemented somehow differently, for example, somehow more competently?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Saboteur, 2018-07-19
@saboteur_kiev

Well, this does not pull on a project for a portfolio, since there is less than an hour of work with Google.
You can make it harder. Make simple links and links with an additional password, attach several types of files - which will be deleted in a day, a month, a year. Maybe even tie monetization for training.
Fasten a virus check through some API thread.
Attach comments to the file.
In general, what you wrote is about 10 lines of code so far.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question