Run code once in PHP library

I am writing a PHP app with Laravel 5. It manages medical images it will have a RESTful API for getting info on stored files and storing new images.

I have a lot of the GET API commands working and am able to upload image files through an HTML form but I would like to be able to upload file(s) via the API. Could somebody please help with an example of how to pass a file this way rather than with an HTML form? For instance, something like this:

Just a pointer in the right direction would be very helpful.


Source: laravel

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.