I am uploading 4 things to my website. For filetype 3 and filetype 4, I am using dd_folder; yet when I try to call it I am getting something like this
url/dd_folder/dd_folder/(filename)
this only happens for filetype 4; here is the code i believe is responsible
else if (!empty($variables_array['item_file_url_' . $file_type]))
{
$file_name = $variables_array['item_file_url_' . $file_type];
$embedded_code = ($this->setts['enable_embedded_media'] && $file_type == 2) ? $variables_array['embedded_code'] : 0;
if ($create_row)
{
$this->upload_create_row($upload_item_id, $file_type, $file_name, $embedded_code);
}
}
if ($file_type == 1) /* image */
{
$nb_uploads = $this->count_contents($variables_array['ad_image']);
$variables_array['ad_image'][$nb_uploads] = $file_name;
}
else if ($file_type == 2) /* video */
{
$nb_uploads = $this->count_contents($variables_array['ad_video']);
$variables_array['ad_video'][$nb_uploads] = $file_name;
}
else if ($file_type == 3) /* digital media */
{
$nb_uploads = $this->count_contents($variables_array['ad_dd']);
$variables_array['ad_dd'][$nb_uploads] = str_replace($this->setts['dd_folder'], '', $file_name);
}
else if ($file_type == 4) /* 4.18.2012 torrent support */
{
$nb_uploads = $this->count_contents($variables_array['ad_torrent']);
$variables_array['ad_torrent'][$nb_uploads] = str_replace($this->setts['dd_folder'], '', $file_name);
}
I think what is happening is that during the other 3 different file uploads, the first dd_folder bit gets removed. Yet when I try it for file type 4 it keeps it for some reason. Can anyone help on this issue?