Homey Community Forum

[App] Image Poster

large

Description

Adds support for posting Image Token’s to a web site. Example use is for storing camera images on a web server.

Usage

  1. Add a flow Send a Image
  2. Add the Image token
  3. Add a URL
  4. Run and check the server

URL Receiver

You need to create a page on the “other side” that can receive a Form POST. Image will be stored with the ID “image”. Here you can find a simple example Upload it to your server and create a folder named images. Then point it out from the Flow e.g. http://yoururl.com/sendImage.php There is some simple logging done.

If you need a simple Gallery this one can be used: Simple Gallery

Links:

Supported devices

All devices that can post a Image Token

Supported Languages:

  • English
1 Like

I gave the app a try, but it doesn’t seem to work completely. I have a PHP file on my web server ready to receive IMG files. I tested this PHP file through another method so I’m 99% sure it should work with this app. I made some logging on this website (like in your example) to check if something happened.

When I sent for example the last snapshot of my Ring doorbell with this app, I can see the action card is busy for approx. 2 seconds and after that shows a green checkmark. But it doesn’t trigger the PHP file. Even the log shows not a single entry (no success nor any error).

-edit: if you want, I can send you a diagnostic report-

Now that I’ve tested it a little bit more, I can conclude that it doesn’t seem to work for big(?) images. Snapshots from my Ring doorbell are not sent with this app, while smaller images are sent to my PHP and stored succesfully. Is there some known limitation to sending large files?

Hmm, have just tried with the images from my camera and I guess they are quite small. There is a known PHP settings that limits uploads to a PHP page to 2MB. Maybe it is this setting hitting the limit? There is a check you can do in the sample code I have that you can just add to your:

if ($file_size > 2097152) {
$errors = ‘File size must be exactly 2 MB’;
}

You can change this in your php.ini file: https://www.a2hosting.com/kb/developer-corner/php/using-php.ini-directives/php-maximum-upload-file-size#:~:text=By%20default%2C%20the%20maximum%20upload,the%20upload_max_filesize%20and%20post_max_size%20directives.

Maybe thats the issue?