- Notifications
You must be signed in to change notification settings - Fork0
slurdge/domf
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This script is a one php file (+config) that allows you to upload files to a host with pomf protocol.
This scriptdoes support:
- Uploading multiple files
- Filtering mime-types
- JSON answers
- Short URLs
- No database needed
This scriptdoes not support:
- Other responses than JSON
- Upload from the webbrowser
- Users, authentication, etc.
Just copy the script to some location and editconfig.php
files.Variables should be self explained.
If you want, you can also mergeconfig.php
andindex.php
files by doing so:
mv index.php index_.phpcat config.php index_.php> index.phprm config.php index_.php
You can now freely move index.php file.
If you want to "secure" your script, you can put it in a random location, such as
>>>importuuid>>>str(uuid.uuid4()).replace('-','')'32b988025e3b477799b9c333ec57048b'
You should also use https protocol in order to prevent someone sniffing the URL.
Once you've done that, change theupload_path
to some other location.
Short URLs are relying on symbolic links, so operating support for symbolic link is needed if you want short URLs.
Main usage is with pomf clients since there is no web interface. It works well fromShareX.