PHPackages                             tommy001/mymodule - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. tommy001/mymodule

ActiveLibrary[File &amp; Storage](/categories/file-storage)

tommy001/mymodule
=================

Class to handle uploading of images within the Anax-MVC framework

v1.0(11y ago)013MITPHPPHP &gt;=5.4

Since Feb 23Pushed 11y ago1 watchersCompare

[ Source](https://github.com/Tommy001/mymodule)[ Packagist](https://packagist.org/packages/tommy001/mymodule)[ RSS](/packages/tommy001-mymodule/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

\#mymodule

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/9c7aa0c5e781b670d0a299d0feab8de460982e9a739618a8f89171611a3b06d8/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f546f6d6d793030312f6d796d6f64756c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Tommy001/mymodule/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/ec8e38109e3d0d0a82d3b04d05d643ab9bdf4105b0158679aa4dc62b7328fc74/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f546f6d6d793030312f6d796d6f64756c652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Tommy001/mymodule/?branch=master)[![Build Status](https://camo.githubusercontent.com/814dc0e4de84435b7da2f20d5a681c01f94d7a5ae0191a3227b763242e0eeca7/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f546f6d6d793030312f6d796d6f64756c652f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Tommy001/mymodule/build-status/master)

mymodule is a class for handling image uploads in the Anax-MVC framework (see )

\#License

This software is free software and carries a MIT license.

\#Description and test guide

**mymodule** contains the php class UploadController that you can use to process uploaded images within the Anax-MVC framework. Future versions will also allow downloads from secure folders on or above root level using a simple proxy script. In this first version there is no support for downloads and uploaded files are stored in the default folder Anax-MVC/webroot/img (where you will need to create a new writable folder named "upload").

The uploaded file is passed through a try and catch method where it is checked for errors, invalid parameters, file size defined in the upload form (MAX\_FILE\_SIZE) and also defined in the script itself. The filename length is limited to 100 characters and only JPG, PNG and GIF images are allowed. If the file pass the "valid upload file" check performed by "move\_uploaded\_file()" it is stored on disk with a secure filename obtained by the php function *sha1\_file()*.

If the uploaded file fail to pass any of these checks it will be handled by the Anax-MVC Exception handler and an error message will be shown.

In order to test this package you will first need to download the framework 'Anax-MVC' from Github. In this description I will presume that you use GIT bash on your computer. I will also presume that you have Composer installed and that you can use Composer on the command line.

Start GIT Bash and change the directory so that your command line prompt is present in the working directory you want to use for this download. After the "$" prompt you may want to type the following line:

> `git clone https://github.com/mosbth/Anax-MVC.git`

After this download you may want to open your text editor (like JEdit or other) and open the file *composer.json* in the folder Anax-MVC. Add these lines to the end of that file, just before the final curly brace:

> ```
>       "require": {
>
> ```

```
    "tommy001/mymodule": "dev-master"
}

```

Now use your command line interface and change the directory into Anax-MVC. Type "Composer validate" to check that your composer.json file is valid. If it checks out, you then type "Composer install" on the command line.

This will download the package **Mymodule** into a folder named "vendor" in Anax-MVC.

In the folder mymodule/webroot there is a file named index.php. Copy that file to the folder Anax-MVC/webroot. Then copy the files from the folder mymodule/view to a new folder named Anax-MVC/app/view/**mymodule**. And finally copy the files from the folder mymodule/src to a new folder named Anax-MVC/app/src/**Mymodule**. As mentioned above you will also need to create a writable folder named Anax-MVC/webroot/img/upload.

In order for simple testing of the upload class there is a rudimentary Sqlite database provided in the mymodule/webroot folder. Move this file to the Anax-MVC webroot folder.

When you are done with this setup you can point your web browser to index.php, mentioned above and upload a valid image.

A sanitized version of the original filename is stored in the database, and can e.g. be used to represent the image in a download list. You may wish to add language specific characters and their replacements to the pattern found in line 180 in the class UploadCOntroller.

The relative disk path of the image is stored with a secure filename in the database, like for example "img/upload/6beb8c7b6305b58cb834161d5a4a383b22101b58.jpg".

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4102d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0a27bcd7fee56e7c48fc7962de890d78a633ac03d0c4daa387c06f31ef651714?d=identicon)[Tommy001](/maintainers/Tommy001)

---

Top Contributors

[![Tommy001](https://avatars.githubusercontent.com/u/9678332?v=4)](https://github.com/Tommy001 "Tommy001 (25 commits)")

---

Tags

uploadanax mvcImage upload

### Embed Badge

![Health badge](/badges/tommy001-mymodule/health.svg)

```
[![Health](https://phpackages.com/badges/tommy001-mymodule/health.svg)](https://phpackages.com/packages/tommy001-mymodule)
```

###  Alternatives

[vich/uploader-bundle

Ease file uploads attached to entities

1.9k25.9M116](/packages/vich-uploader-bundle)[coffeecode/uploader

It is a easy PHP upload manager for images, files and media in your application

17149.7k3](/packages/coffeecode-uploader)[kingofcode/laravel-uploadable

Laravel Uploadable trait to automatically upload images and files with minimum configuration

286.4k](/packages/kingofcode-laravel-uploadable)[marrouchi/upload-crop-image-bundle

Basic server side cropping behavior for Symfony2

111.1k](/packages/marrouchi-upload-crop-image-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
