Menu

IMAGE upload

Penel Norbert - lead Dev
<form action="https://<?= $_SERVER['HTTP_HOST'] ?>/images/?api_key=<?= MY_AUTH_KEY ?>"
 method="POST" enctype="multipart/form-data">
    <input type="file" name="image" /><br />
    <input type="text" name="directory" value="repertoire1" /><br />
    <input type="submit" />
</form>

you can setup a directory where the image will be stored
it accepts JPEG GIF and PNG

The POST process return the id of your image

you can access to an image by this kind of url to retrieve the 12th images:

https://api.DOMAIN.com/images/12/?api_key=XXXXXXXXXXXXXXXXXXXXXXXXX

you can resize an image this way:

https://api.DOMAIN.fr/images/1/?api_key=XXXXXXXXXXXXXXXXXXXXXXXXX&width=60&height=60

Hack preventions are correctly made !


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.