Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mrcyjanek/upldr
[incomplete] Simple, easy-to-use php file handler
https://github.com/mrcyjanek/upldr
Last synced: about 2 months ago
JSON representation
[incomplete] Simple, easy-to-use php file handler
- Host: GitHub
- URL: https://github.com/mrcyjanek/upldr
- Owner: MrCyjaneK
- Created: 2021-07-26T21:05:35.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-09-14T09:33:24.000Z (over 3 years ago)
- Last Synced: 2024-10-12T01:37:02.978Z (2 months ago)
- Language: PHP
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Upldr
Upldr is a simple, easy to use php library for handling file uploads and storing them on client side.
# How to use?
```php
pwd() // "/"
$user_store->mkdir("Things"); // Create new directory.
$user_store->cd("Things"); // Change directory.
$user_store->pwd(); // "/Things"
if (isset($_FILES["fileToUpload"])) {
$user_store->createFileUploaded($_FILES["fileToUpload"], basename($_FILES["fileToUpload"]["name"]));
// An example form:
//
//
//
//
}
$user_store->cd("/") // Change back to root, one could also use '..'
$user_store->createFileGet("https://cataas.com/cat", "cat.png"); // use file_get_contents to write to 'cat.png'
$user_store->copy("cat.png", "Things/better_cat.png");
$user_store->ls();
```