Welcome Guest, Not a member yet? Register   Sign In
$mp3config['encrypt_name'] = TRUE not encoding?
#1

[eluser]stevenazari[/eluser]
Hi guys,

I'm trying to bug fix an mp3 uploading issue and I've narrowed it down to the following problem.

Code:
//Upload config setup
$mp3config['upload_path'] = './media/audio/';
$mp3config['allowed_types'] = 'mp3|MP3';
$mp3config['max_size'] = '0';
$mp3config['encrypt_name'] = TRUE;
$mp3config['remove_spaces'] = TRUE;
$this->upload->initialize($mp3config);
//End of config

//Do upload and assign array
$this->upload->do_upload('bandtrackfile');
$bandtrackupload = $this->upload->data();
$date = time();
                
// Do S3 audio/mpeg
if (!is_file($bandtrackupload['full_path']))
   {
   echo "An error has occured please inform the web master on [email protected] and send the below information:<br>";
   echo "Bandtrackupload:<br>";
   print_r ($bandtrackupload);
   die();
   }

OK so there is the upload configuration which to my knowledge is correct and an if statement to check if its right... Now when I and my colleagues try uploading mp3s we have no problems. But we keep getting reports from users with the following messages:

Code:
An error has occurred please inform the web master on [email protected] and send the below information:
Array (
       [file_name]      => Sunshine No Intro.mp3
       [file_type]      => audio/mp3
       [file_path]      => /home/gq36staa/web/public/media/audio/
       [full_path]      => /home/gq36staa/web/public/media/audio/Sunshine No Intro.mp3
       [raw_name]       => Sunshine No Intro
       [orig_name]      =>
       [file_ext]       => .mp3
       [file_size]      => 4720.12
       [is_image]       =>
       [image_width]    =>
       [image_height]   =>
       [image_type]     =>
       [image_size_str] =>
      )

now I done a test to deliberately get that error and when I do I get the following array information:

Code:
An error has occured please inform the web master on [email protected] and send the below information:
Bandtrackupload:
Array (
      [file_name]      => 166c4dea8e99da2469d7cc2b4bcd712c.mp3
      [file_type]      => audio/mpeg
      [file_path]      => /home/gq36staa/web/public/media/audio/
      [full_path]      => /home/gq36staa/web/public/media/audio/166c4dea8e99da2469d7cc2b4bcd712c.mp3
      [raw_name]       => 166c4dea8e99da2469d7cc2b4bcd712c
      [orig_name]      => testcase.mp3
      [file_ext]       => .mp3
      [file_size]      => 14.33
      [is_image]       =>
      [image_width]    =>
      [image_height]   =>
      [image_type]     =>
      [image_size_str] =>
      )

From what I can see the file name is not being encoded nor is the spaces being removed which to me suggests the code is looking for the renamed version of the file but only the original file is there... if it is uploaded at all...

Does anyone know why this is an issue with some of my members and not with others? I haven't upgraded code igniter and not entirely sure how to be honest (I'm self learning and picked up from a previous developer) I've been here a year so not sure what has changed since then...

Any help would be amazing


Messages In This Thread
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 09-29-2009, 04:40 AM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 09-29-2009, 08:02 AM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 09-30-2009, 03:35 AM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 09-30-2009, 07:15 AM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 09-30-2009, 08:04 AM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 09-30-2009, 11:49 PM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 10-02-2009, 06:19 AM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 10-02-2009, 07:03 AM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 10-02-2009, 07:13 AM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 10-02-2009, 07:53 AM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 10-02-2009, 08:07 AM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 10-05-2009, 12:00 AM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 10-05-2009, 03:02 PM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 10-05-2009, 03:24 PM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 10-05-2009, 04:21 PM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 10-05-2009, 04:28 PM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 10-06-2009, 07:31 AM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 10-07-2009, 12:43 AM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 10-08-2009, 07:04 AM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 10-08-2009, 07:26 AM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 10-08-2009, 07:35 AM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 10-08-2009, 07:45 AM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 10-09-2009, 12:11 AM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 10-09-2009, 05:54 AM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 10-09-2009, 06:12 AM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 10-09-2009, 06:58 AM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 10-09-2009, 07:02 AM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 10-09-2009, 07:20 AM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 10-09-2009, 08:04 AM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 10-12-2009, 03:24 AM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 10-13-2009, 07:28 AM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 10-13-2009, 08:19 AM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 10-14-2009, 03:44 AM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 10-14-2009, 03:50 AM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 10-14-2009, 03:59 AM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 10-14-2009, 04:05 AM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 10-14-2009, 06:55 AM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 10-14-2009, 07:47 AM
$mp3config['encrypt_name'] = TRUE not encoding? - by El Forum - 10-15-2009, 01:12 AM



Theme © iAndrew 2016 - Forum software by © MyBB