Re: Problem Uploading Flash

2009-06-05 Thread Arak Tai'Roth

Ummm it says on the page http://www.meiocodigo.com/projects/meioupload/
that it can upload any kind of file. I'm still checking those things
that brian told me to check out, been super busy lately with other
stuff to be able to get back into this.

On May 31, 2:44 pm, gerhardsletten gerhardslet...@gmail.com wrote:
 MeioUpload is made for images..

 If you have modified it, to handle all kinds of files, check to see if
 you can upload other kind of files.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem Uploading Flash

2009-05-31 Thread Arak Tai'Roth

I will try those things and get back to you. About the perms though,
they are correct, as those are the perms on my images directories that
I upload to as well and that works fine, so I'm pretty sure the perms
are correct.

On May 30, 2:13 pm, brian bally.z...@gmail.com wrote:
 On Sat, May 30, 2009 at 3:07 PM, Arak Tai'Roth nielsen.dus...@gmail.com 
 wrote:

  As far as I'm aware if the extension is .flv, then shouldn't the
  mimetype be video/x-flv?

 The behavior depends upon the whatever the browser says is the MIME
 type. You can see it in the data array. If you're not familiar with
 the data sent in the case of uploads, do this:

 if (!empty($this-data))
 {
    die(debug($this-data));

  The file size is way less then the maximum file size that's allowed,
  it's only a 6 second flash video that I'm just using to test this.

 Again, look in the data array to be sure.

  However I'm not sure how to log the error key or anything as it's
  being uploaded.

 $this-log($this-data['the_array_key']);

 See here for the error explanations:

 http://ca3.php.net/manual/en/features.file-upload.errors.php

  The permissions are fine, that's one of the first things I checked,
  the folders that are being written to are all set at 775.

 Who owns the dir, though? That's only open for the owner  group. If
 the apache user isn't one of those, the file cannot be saved.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem Uploading Flash

2009-05-31 Thread gerhardsletten

MeioUpload is made for images..

If you have modified it, to handle all kinds of files, check to see if
you can upload other kind of files.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem Uploading Flash

2009-05-30 Thread Arak Tai'Roth

I could still really use a hand on this problem if anyone can offer
it.

On May 29, 4:49 am, Arak Tai'Roth nielsen.dus...@gmail.com wrote:
 Anyone able to help with this?

 On May 28, 7:29 am, Arak Tai'Roth nielsen.dus...@gmail.com wrote:

  So I have a problem uploading a flash video using MeioUpload in
  CakePHP. Here is my controller code for the add function:

                  function add()
                  {
                          if (!empty($this-data['Video']))
                          {
                                  $mrClean = new Sanitize();
                                  $id = $this-Session-read('buildId');
                                  $slug = $this-Session-read('buildSlug');

                                  $this-data['Video']['build_id'] = $id;

                                  if 
  ($this-Video-save($this-data['Video']))
                                  {
                                          $this-Session-setFlash('New video 
  for build ' . $slug . ' have
  been added.');

                                          $this-redirect('/builds/view/' . 
  $slug);
                                          $this-exit();
                                  }
                                  else
                                  {
                                          $this-Session-setFlash('New video 
  for build ' . $slug . ' could
  not be added.');

                                          $this-redirect('/builds/view/' . 
  $slug);
                                          $this-exit();
                                  }
                          }
                  }

  and the code for the Video model:

          class Video extends AppModel
          {
                  var $name = 'Video';

                  var $actsAs = array(
                          'MeioUpload' = array(
                                  'video' = array(
                                          'dir' = 'videos/builds/uploads',
                                          'create_directory' = false,
                                          'allowed_mime' = 
  array('video/x-flv'),
                                          'allowed_ext' = array('.flv')
                                  )
                          )
                  );
          }

  and the code for the add view:

  echo $form-create('Video', array('action' = 'add', 'type' =
  'file'));
          echo $form-label('Video.video', 'Video:');
          echo $form-input('Video.video', array('label' = false, 'type' =
  'file'));

          echo $form-submit('background.png');
  echo $form-end();

  I've been through this now for the past 2 days and can't figure out
  anything wrong with the code, yet the video will not get uploaded and
  as such the database entry never gets created. I have no idea what the
  problem is so I have no clue what to look for. Is anyone able to help
  me with this?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem Uploading Flash

2009-05-30 Thread brian
Are you certain that the MIME is correct? Log what the browser thinks
the MIME for your file is. Note that this behavior relies completely
on the browser's best guess for the MIME type and doesn't use anything
server-side to figure it out, eg. FileInfo, mime_content_type().

Is the file even being sent to the server in the first place? Log the
file size. And the error key--it should be zero.

And check the permissions on the dir where this should be stored. You
don't have to set it to 0777, just make sure the webserver owns it.

On Sat, May 30, 2009 at 6:40 AM, Arak Tai'Roth nielsen.dus...@gmail.com wrote:

 I could still really use a hand on this problem if anyone can offer
 it.

 On May 29, 4:49 am, Arak Tai'Roth nielsen.dus...@gmail.com wrote:
 Anyone able to help with this?

 On May 28, 7:29 am, Arak Tai'Roth nielsen.dus...@gmail.com wrote:

  So I have a problem uploading a flash video using MeioUpload in
  CakePHP. Here is my controller code for the add function:

                  function add()
                  {
                          if (!empty($this-data['Video']))
                          {
                                  $mrClean = new Sanitize();
                                  $id = $this-Session-read('buildId');
                                  $slug = $this-Session-read('buildSlug');

                                  $this-data['Video']['build_id'] = $id;

                                  if 
  ($this-Video-save($this-data['Video']))
                                  {
                                          $this-Session-setFlash('New 
  video for build ' . $slug . ' have
  been added.');

                                          $this-redirect('/builds/view/' . 
  $slug);
                                          $this-exit();
                                  }
                                  else
                                  {
                                          $this-Session-setFlash('New 
  video for build ' . $slug . ' could
  not be added.');

                                          $this-redirect('/builds/view/' . 
  $slug);
                                          $this-exit();
                                  }
                          }
                  }

  and the code for the Video model:

          class Video extends AppModel
          {
                  var $name = 'Video';

                  var $actsAs = array(
                          'MeioUpload' = array(
                                  'video' = array(
                                          'dir' = 'videos/builds/uploads',
                                          'create_directory' = false,
                                          'allowed_mime' = 
  array('video/x-flv'),
                                          'allowed_ext' = array('.flv')
                                  )
                          )
                  );
          }

  and the code for the add view:

  echo $form-create('Video', array('action' = 'add', 'type' =
  'file'));
          echo $form-label('Video.video', 'Video:');
          echo $form-input('Video.video', array('label' = false, 'type' =
  'file'));

          echo $form-submit('background.png');
  echo $form-end();

  I've been through this now for the past 2 days and can't figure out
  anything wrong with the code, yet the video will not get uploaded and
  as such the database entry never gets created. I have no idea what the
  problem is so I have no clue what to look for. Is anyone able to help
  me with this?
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem Uploading Flash

2009-05-30 Thread Arak Tai'Roth

As far as I'm aware if the extension is .flv, then shouldn't the
mimetype be video/x-flv?

The file size is way less then the maximum file size that's allowed,
it's only a 6 second flash video that I'm just using to test this.
However I'm not sure how to log the error key or anything as it's
being uploaded.

The permissions are fine, that's one of the first things I checked,
the folders that are being written to are all set at 775.

On May 30, 10:28 am, brian bally.z...@gmail.com wrote:
 Are you certain that the MIME is correct? Log what the browser thinks
 the MIME for your file is. Note that this behavior relies completely
 on the browser's best guess for the MIME type and doesn't use anything
 server-side to figure it out, eg. FileInfo, mime_content_type().

 Is the file even being sent to the server in the first place? Log the
 file size. And the error key--it should be zero.

 And check the permissions on the dir where this should be stored. You
 don't have to set it to 0777, just make sure the webserver owns it.

 On Sat, May 30, 2009 at 6:40 AM, Arak Tai'Roth nielsen.dus...@gmail.com 
 wrote:

  I could still really use a hand on this problem if anyone can offer
  it.

  On May 29, 4:49 am, Arak Tai'Roth nielsen.dus...@gmail.com wrote:
  Anyone able to help with this?

  On May 28, 7:29 am, Arak Tai'Roth nielsen.dus...@gmail.com wrote:

   So I have a problem uploading a flash video using MeioUpload in
   CakePHP. Here is my controller code for the add function:

                   function add()
                   {
                           if (!empty($this-data['Video']))
                           {
                                   $mrClean = new Sanitize();
                                   $id = $this-Session-read('buildId');
                                   $slug = 
   $this-Session-read('buildSlug');

                                   $this-data['Video']['build_id'] = $id;

                                   if 
   ($this-Video-save($this-data['Video']))
                                   {
                                           $this-Session-setFlash('New 
   video for build ' . $slug . ' have
   been added.');

                                           $this-redirect('/builds/view/' 
   . $slug);
                                           $this-exit();
                                   }
                                   else
                                   {
                                           $this-Session-setFlash('New 
   video for build ' . $slug . ' could
   not be added.');

                                           $this-redirect('/builds/view/' 
   . $slug);
                                           $this-exit();
                                   }
                           }
                   }

   and the code for the Video model:

           class Video extends AppModel
           {
                   var $name = 'Video';

                   var $actsAs = array(
                           'MeioUpload' = array(
                                   'video' = array(
                                           'dir' = 'videos/builds/uploads',
                                           'create_directory' = false,
                                           'allowed_mime' = 
   array('video/x-flv'),
                                           'allowed_ext' = array('.flv')
                                   )
                           )
                   );
           }

   and the code for the add view:

   echo $form-create('Video', array('action' = 'add', 'type' =
   'file'));
           echo $form-label('Video.video', 'Video:');
           echo $form-input('Video.video', array('label' = false, 'type' 
   =
   'file'));

           echo $form-submit('background.png');
   echo $form-end();

   I've been through this now for the past 2 days and can't figure out
   anything wrong with the code, yet the video will not get uploaded and
   as such the database entry never gets created. I have no idea what the
   problem is so I have no clue what to look for. Is anyone able to help
   me with this?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem Uploading Flash

2009-05-30 Thread brian

On Sat, May 30, 2009 at 3:07 PM, Arak Tai'Roth nielsen.dus...@gmail.com wrote:

 As far as I'm aware if the extension is .flv, then shouldn't the
 mimetype be video/x-flv?

The behavior depends upon the whatever the browser says is the MIME
type. You can see it in the data array. If you're not familiar with
the data sent in the case of uploads, do this:

if (!empty($this-data))
{
   die(debug($this-data));

 The file size is way less then the maximum file size that's allowed,
 it's only a 6 second flash video that I'm just using to test this.

Again, look in the data array to be sure.

 However I'm not sure how to log the error key or anything as it's
 being uploaded.

$this-log($this-data['the_array_key']);

See here for the error explanations:

http://ca3.php.net/manual/en/features.file-upload.errors.php

 The permissions are fine, that's one of the first things I checked,
 the folders that are being written to are all set at 775.

Who owns the dir, though? That's only open for the owner  group. If
the apache user isn't one of those, the file cannot be saved.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem Uploading Flash

2009-05-29 Thread Arak Tai'Roth
Anyone able to help with this?

On May 28, 7:29 am, Arak Tai'Roth nielsen.dus...@gmail.com wrote:
 So I have a problem uploading a flash video using MeioUpload in
 CakePHP. Here is my controller code for the add function:

                 function add()
                 {
                         if (!empty($this-data['Video']))
                         {
                                 $mrClean = new Sanitize();
                                 $id = $this-Session-read('buildId');
                                 $slug = $this-Session-read('buildSlug');

                                 $this-data['Video']['build_id'] = $id;

                                 if ($this-Video-save($this-data['Video']))
                                 {
                                         $this-Session-setFlash('New video 
 for build ' . $slug . ' have
 been added.');

                                         $this-redirect('/builds/view/' . 
 $slug);
                                         $this-exit();
                                 }
                                 else
                                 {
                                         $this-Session-setFlash('New video 
 for build ' . $slug . ' could
 not be added.');

                                         $this-redirect('/builds/view/' . 
 $slug);
                                         $this-exit();
                                 }
                         }
                 }

 and the code for the Video model:

         class Video extends AppModel
         {
                 var $name = 'Video';

                 var $actsAs = array(
                         'MeioUpload' = array(
                                 'video' = array(
                                         'dir' = 'videos/builds/uploads',
                                         'create_directory' = false,
                                         'allowed_mime' = 
 array('video/x-flv'),
                                         'allowed_ext' = array('.flv')
                                 )
                         )
                 );
         }

 and the code for the add view:

 echo $form-create('Video', array('action' = 'add', 'type' =
 'file'));
         echo $form-label('Video.video', 'Video:');
         echo $form-input('Video.video', array('label' = false, 'type' =
 'file'));

         echo $form-submit('background.png');
 echo $form-end();

 I've been through this now for the past 2 days and can't figure out
 anything wrong with the code, yet the video will not get uploaded and
 as such the database entry never gets created. I have no idea what the
 problem is so I have no clue what to look for. Is anyone able to help
 me with this?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Problem Uploading Flash

2009-05-28 Thread Arak Tai'Roth

So I have a problem uploading a flash video using MeioUpload in
CakePHP. Here is my controller code for the add function:

function add()
{
if (!empty($this-data['Video']))
{
$mrClean = new Sanitize();
$id = $this-Session-read('buildId');
$slug = $this-Session-read('buildSlug');

$this-data['Video']['build_id'] = $id;

if ($this-Video-save($this-data['Video']))
{
$this-Session-setFlash('New video for 
build ' . $slug . ' have
been added.');

$this-redirect('/builds/view/' . 
$slug);
$this-exit();
}
else
{
$this-Session-setFlash('New video for 
build ' . $slug . ' could
not be added.');

$this-redirect('/builds/view/' . 
$slug);
$this-exit();
}
}
}

and the code for the Video model:

class Video extends AppModel
{
var $name = 'Video';

var $actsAs = array(
'MeioUpload' = array(
'video' = array(
'dir' = 'videos/builds/uploads',
'create_directory' = false,
'allowed_mime' = array('video/x-flv'),
'allowed_ext' = array('.flv')
)
)
);
}

and the code for the add view:

echo $form-create('Video', array('action' = 'add', 'type' =
'file'));
echo $form-label('Video.video', 'Video:');
echo $form-input('Video.video', array('label' = false, 'type' =
'file'));

echo $form-submit('background.png');
echo $form-end();

I've been through this now for the past 2 days and can't figure out
anything wrong with the code, yet the video will not get uploaded and
as such the database entry never gets created. I have no idea what the
problem is so I have no clue what to look for. Is anyone able to help
me with this?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---