Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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();
```