how to attactment jpg file on redmine server

Added by Bunsong Sum over 5 years ago

Hi all please help your idea to upload jpg using php code to redmine server

This code can add issue only, can you guide me about how to upload image to server path

i have some code below:

if(isset($_POST['task'])) {

/*echo '
        echo $data['projectId'];
        echo $data['subject'];
        echo $data['description'];
        echo '
$issue = new Issue (
//echo $issue->id;


<form action="" method="post">
<input type="hidden" name="task" value="1" />
<td>Project ID:</td>
<select name="projectId" class="select">

foreach($projects as $project) {
&lt;option value="<?php echo $project['id']; ?>">
echo $project['id'];
&lt;td&gt;&lt;input name="subject" /&gt;&lt;/td&gt;
&lt;textarea name="description" rows="10" cols="10"&gt;
&lt;td&gt;&lt;input type=submit value="Create New Issue" class="button"/&gt;&lt;/td&gt;