Quantcast
Channel: phpBB.com
Viewing all articles
Browse latest Browse all 1684

Extension Writers Discussion • Attachments in extensions

$
0
0
Was wondering if someone could post a guide on how to add the attachments feature to an extension. So far all I've done is make an attachment table in a migration.

Code:

$this->table_prefix . 'trackers_attachments'=> ['COLUMNS'=> ['attach_id'=> ['UINT', null, 'auto_increment'],'post_msg_id'=> ['UINT', 0],'ticket_id'=> ['UINT', 0],'in_message'=> ['BOOL', 0],'poster_id'=> ['UINT', 0],'is_orphan'=> ['BOOL', 1],'physical_filename'=> ['VCHAR:255', ''],'real_filename'=> ['VCHAR:255', ''],'download_count'=> ['UINT', 0],'attach_comment'=> ['TEXT_UNI', ''],'extension'=> ['VCHAR:100', ''],'mimetype'=> ['VCHAR:100', ''],'filesize'=> ['UINT', 0],'filetime'=> ['TIMESTAMP', 0],'thumbnail'=> ['BOOL', 0],],'PRIMARY_KEY'=> 'attach_id','KEYS'=> ['filetime'=> ['INDEX', 'filetime'],'post_msg_id'=> ['INDEX', 'post_msg_id'],'ticket_id'=> ['INDEX', 'ticket_id'],'poster_id'=> ['INDEX', 'poster_id'],'is_orphan'=> ['INDEX', 'is_orphan'],],],
After this, I'm lost as to what service(s) to include and how the code for the form should look so that the file gets added to the DB and to the /files/ directory in my extension.

Statistics: Posted by Kailey — Wed Jul 24, 2024 11:19 pm



Viewing all articles
Browse latest Browse all 1684

Trending Articles