How to upload file on server with ATiM feature2019-08-08T08:25:35-05:00

HOW TO UPLOAD FILES ON SERVER WITH ATIM FEATURES

Introduction

In ATiM, a feature exists to download file on the server using properties of a ‘file’ field of a form.

Configuration

core.php

The directory that contains the uploaded files is located beside the ‘APP’ directory of ATiM and should be defined in the core file (see example below with directory ./app/atimUploadDirectory). However you can move the directory somewhere else changing following core variables.

Permission on directory has to be changed. To setup permissions on directory, please see Quick Install Guide (Step by Step).

Copy to Clipboard
  • If you want to keep the files for ever set the deleteUploadedFilePhysically to false.
  • The directory that will contain the deleted and replaced files is defined by deleteDirectory.
  • The maximum size of each file for upload is 10MB by default. See maxUploadFileSize.
PHP.ini
  • The PHP.ini should changed but it can be done also in core.php using following line code
Copy to Clipboard

Field specification

  • In structure_fields table set the type of the field to ‘file’ and the setting to ‘class=upload’.