Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Log1x/pomf
A simple implementation of the Pomf API.
https://github.com/Log1x/pomf
image-upload katana pomf screenshot screenshots sharex
Last synced: 3 months ago
JSON representation
A simple implementation of the Pomf API.
- Host: GitHub
- URL: https://github.com/Log1x/pomf
- Owner: Log1x
- License: mit
- Created: 2019-10-14T09:38:13.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-10-16T20:20:51.000Z (about 5 years ago)
- Last Synced: 2024-07-31T02:34:08.497Z (3 months ago)
- Topics: image-upload, katana, pomf, screenshot, screenshots, sharex
- Language: PHP
- Homepage: https://github.com/log1x/pomf
- Size: 15.6 KB
- Stars: 5
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Pomf Stand-alone API for PHP
Here lives a simple, modernized, stand-alone implementation of the Pomf API commonly seen in screenshot tools such as [ShareX](https://github.com/ShareX/ShareX) and [Katana](https://github.com/bluegill/katana).
The purpose of this project is for those who want to self-host their screenshots without a frontend as seen in the original [Pomf](https://github.com/pomf/pomf-php) project.
### Features
- Clean, modernized code-base with PSR-2.
- Uses [Bulletproof](https://github.com/samayo/bulletproof) to securely (and properly) handle image uploads.
- Configurable token to prevent outside uploading.
- Customizable screenshot filenames with the ability to set a slug and timestamp (e.g. `Screenshot_2019-03-02_13-12-57.png`) or as a randomized string using the [Hashids](https://github.com/ivanakimov/hashids.php) library.### Installation
```bash
$ composer create-project log1x/pomf screenshots
```### Usage
- Set configuration in `config.php`.
- Upload the `pomf` folder contents to your server.
- Configure your Pomf App with your URL (e.g. `https://example.com/screenshots/upload.php?token=secret`)### Testing
For testing purposes, you can use `curl`:
```bash
$ curl -i -X POST -F 'file=test@path/to/test.jpg' 'https://example.com/screenshots/upload.php?token=secret'
```or `httpie`:
```bash
$ http --form 'https://example.com/screenshots/upload.php?token=secret' 'test@path/to/test.jpg'
```