User Tools

Site Tools


wmanager:dummy_attachment

Attachment Directive

Attachment in WManager can be handled through a simple html tag that allows you to add attachments sections to yours web pages where you can add,delete or download attachments. It is handled through a angular directive that be used all around the application. The syntax to use it is.

<div attachment attachment-refid='REF_ID' attachment-refkey="AMBIT_KEY" custid='YOUR_CL_ID' beid='BE_ID'></div>

The tables in which the attachments will be stored is attachment. And the path in which the attachment will be stored is in the config value UPLOAD_DIR. Attachment type is taken from list_ambits table. If the setup_attachment table has more then one ambits it will show types in the dropdown list otherwise attach type will be taken from the hidden field.

On saving the attachment, it will get stored in attachment table and the file will be upload in the configuration folder/customer_id/attachment_id/file.

Controller FileName: /common/new_attachment.php
Attachment List function: attachment_list($ref_id, $ref_key)
Attachment Upload function: upload($ref_key,$ref_id)
Attachment Delete function: delete_file($attachment_id)
Attachment Download function: download_file($attachment_id,$key,$id)
wmanager/dummy_attachment.1524746348.txt.gz · Last modified: 2018/04/26 12:39 by raghav naik