Member-only story

Using ApyHub for Image Moderation

Yoram Kornatzky
2 min readMay 21, 2024

In Auctibles, we use ApyHub to moderate images of items for auction. Auctibles is built using the Laravel PHP framework.

Uploading Image Files

Videos are effortlessly uploaded using a straightforward Livewire component and an HTML input element with type=file.

<input id="photos" name="photos" type="file" class="sr-only" wire:model.live="photos" accept="image/png,image/jpg,image/gif">

The component has a public property:

public $photos = [];

Upon clicking a submit button, we apply validation to the field,

'photos' => 'nullable|array|max:3', // array
'photos.*' => [
'required',
'image',
'max:10240', // 10MB
new ExplicitImage(),
],

ExplicitImage is a validation rule.

Temporary Files

We upload temporary files to a Minio bucket which resides on the server. The bucket is defined as an uploads bucket for Laravel. This is done in config/filesystems.php.

ApyHub Results for Image Content

We use curl to call ApyHub. The response looks like this:

{
"data": {
"apyhub": {
"adult": {
"adultScore"

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Yoram Kornatzky
Yoram Kornatzky

Written by Yoram Kornatzky

Entrepreneur, Auctibles: https://auctibles.com, 25 years of development experience, Ph.D. Computer Science

Responses (1)

Write a response

This is great! Thanks for sharing this Yoram.