linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-developers] wrong in my sharing server


From: Sylvain Berfini
Subject: Re: [Linphone-developers] wrong in my sharing server
Date: Fri, 02 Aug 2013 12:26:14 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130623 Thunderbird/17.0.7

Hi Roland,

Your script seems good.
Do you have any error log to show me that would help me understand the issue ?
Maybe the problem is the size of the pictures you upload and you size < 1000 condition ?

Regards.
Sylvain Berfini
Software Engineer @ Belledonne Communications
On 02/08/2013 11:46, Roland Ohlsson wrote:
I tried to put up my own server, and if i am changing from userfile to file, and upload it from the web, it goes well, however, sending it from linphone isn't working unfortunatelly, here is my code to my sharing server:

<?php

function getExtension($str)
{
    $i = explode('.', $str);
    return strtolower(end($i));
}
if ($_FILES["userfile"]["error"] > 0)
  {
      return;
  }
else
  {
  $size = ($_FILES["userfile"]["size"] / 1024);
  if($size > 1000)
  {
     return;
  }
  $locdir = dirname(__FILE__);
  $globdir = "http://192.168.91.101/userdata";
 
  $uploaddir = '/images/' . date('Y-m-d') . '/';
  if (!is_dir($uploaddir)) {
    mkdir($uploaddir, 0777);        
  }
  $uploadfile  = $uploaddir . uniqid() . '.' . getExtension($_FILES["userfile"]["name"]);

  if (move_uploaded_file($_FILES['userfile']['tmp_name'], $locdir . $uploadfile))
  {
    echo $globdir . $uploadfile;
  }
}
?>

BR Roland


_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers


reply via email to

[Prev in Thread] Current Thread [Next in Thread]