Uploading

This example is the same example as the uploading-file example. This example lets uploading files, checking if they are image files, resizing, watermarking and saving them as "jpeg" files.

Where to find the example

This example is included inside the Artaengine package. You can find it in this directory:

/artaengine/examples/example12

download Artaengine package

Deploy and run the example

  • Create a new database in PostgreSQL or MySQL and name it arta_examples. All Artaengine examples are set to use this database.
  • Download the Artaengine package
  • Extract into your "www" directory.
  • It is recommended to create a virtual host for /www/artaengine/examples
  • Find this example in /www/artaengine/examples/example12 enter the directory and follow:
  • Edit the /configure.ini and update the settings to your local. Make sure the database connection configs match with the database you created for the example(s).
  • Edit /factories/Example.php and edit the Example.connection() method, there is an example of a manual connection to a database (the connection configs are set inside the source code not the config.ini) change the connection configs to your database.
  • Set permissions. Artaengine requires write permissions to the /_temp directory.
  • Build the example e.g. (http://artaexamples.local/example12/build)
  • If build shows errors:
    • Check directory permissions
    • Empty temp directory
    • Check if "/start.php" and "/configure.ini" have correct paths and settings
    • Check the database and model settings

Deploying with Artaengine project administrator

Alternatively you can deploy the examples via the Artaengine project administrator GUI

After deploying the Artaengine project administrator, goto the Existing menu and search for the examples. Add the examples to the administrator the goto the Update menu and manage the example you want.

Related Tutorials

Uploading
Editing images