I need to upload on Drupal 8 a file from an URL programmatically without using a form and a field type 'managed_file'. I'm not sure how to do this, I found different web pages on it but it's often the old version of Drupal and only some part of code.
What exactly I want to do :
- I Have an URL (for example a PDF document, a *.doc, ...)
- I need to save it on Drupal and create the associated record in the database