I
I
Igor2019-10-05 14:39:11
symfony
Igor, 2019-10-05 14:39:11

How to upload files in symfony 4 without a form?

Good afternoon colleagues.
Considered many examples and ready-made solutions. All this is good, of course.
Everywhere the use of the form is implied.
I have the following task.
There must be a specific API method to upload a file or files. As a first approximation, so far one file.
The client (browser, or mobile application) generates a request to send the file.
After the File is loaded, the server should return some information about the file. For example http URL so that this file can be downloaded.
Is it possible to somehow implement this without using doctrine? Maybe there is some library that is not integrated into the doctrine.
The controller has a Service request
Which in turn has a files property.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question