> For the complete documentation index, see [llms.txt](https://nagara.gitbook.io/code-zero-project/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nagara.gitbook.io/code-zero-project/helper/upload-directory.md).

# upload directory

### upload\_dir()

upload dir adalah function yang dibuat untuk mengarahkan ke root foldernya yaitu storage&#x20;

```php
<?php
$filename = $data["image"]["name"];
$pathfile = upload_dir("image") . $filename . png; 

// return path file
// document root/storage/image/gambar.png
```
