Handling Files in a REST API with PHP

Опубликовано: 17 Февраль 2025
на канале: Dave Hollingworth
3,251
149

Learn how to handle files in a PHP REST API.
Please consider supporting my channel: ☕ https://ko-fi.com/davehollingworth

In this project-based tutorial, code along with the instructor to create a partial RESTful API to handle file uploads and file retrieval.

This project uses the SLIM PHP Microframework.

Source code:
‣ https://gist.github.com/daveh/432e347...

Links shown in the video:
‣ https://www.slimframework.com/
‣ https://www.php.net/manual/en/reserve...
‣ https://www.slimframework.com/docs/v4...
‣ https://www.php.net/manual/en/feature...

Related videos:
‣ Full Slim API tutorial:    • REST API with PHP and MySQL | Full Sl...  
‣ Composer:    • Use Composer to Easily Manage PHP Pac...  
‣ use statements:    • PHP namespaces 6/10: Adding an alias ...  
‣ Handling files in PHP:    • PHP File Uploads | The Complete Guide...  

00:00 Introduction
00:28 Initial setup
02:42 Retrieving file data
04:43 Validation
06:32 Save the file
07:51 Get a file resource
09:12 Delete a file resource
10:12 Outro

#PHP #api #rest