mirror of
https://github.com/misterunknown/ifm.git
synced 2025-08-09 17:46:31 +02:00
fixed wrong encoding of remote upload urls
This commit is contained in:
@@ -2120,7 +2120,7 @@ function IFM( params ) {
|
||||
dir: ifm.currentDir,
|
||||
filename: filename,
|
||||
method: method,
|
||||
url: encodeURI( url )
|
||||
url: url
|
||||
}),
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
@@ -3540,7 +3540,7 @@ function IFM( params ) {
|
||||
else {
|
||||
$fp = fopen( $filename, "w" );
|
||||
if( $fp ) {
|
||||
if( !curl_setopt( $ch, CURLOPT_URL, $d['url'] ) || !curl_setopt( $ch, CURLOPT_FILE, $fp ) || !curl_setopt( $ch, CURLOPT_HEADER, 0 ) || !curl_exec( $ch ) )
|
||||
if( !curl_setopt( $ch, CURLOPT_URL, urldecode( $d['url'] ) ) || !curl_setopt( $ch, CURLOPT_FILE, $fp ) || !curl_setopt( $ch, CURLOPT_HEADER, 0 ) || !curl_exec( $ch ) )
|
||||
$this->jsonResponse( array( "status" => "ERROR", "message" => $this->l['error']." ".curl_error( $ch ) ) );
|
||||
else {
|
||||
$this->jsonResponse( array( "status" => "OK", "message" => $this->l['file_upload_success'] ) );
|
||||
|
4
ifm.php
4
ifm.php
@@ -2120,7 +2120,7 @@ function IFM( params ) {
|
||||
dir: ifm.currentDir,
|
||||
filename: filename,
|
||||
method: method,
|
||||
url: encodeURI( url )
|
||||
url: url
|
||||
}),
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
@@ -3540,7 +3540,7 @@ function IFM( params ) {
|
||||
else {
|
||||
$fp = fopen( $filename, "w" );
|
||||
if( $fp ) {
|
||||
if( !curl_setopt( $ch, CURLOPT_URL, $d['url'] ) || !curl_setopt( $ch, CURLOPT_FILE, $fp ) || !curl_setopt( $ch, CURLOPT_HEADER, 0 ) || !curl_exec( $ch ) )
|
||||
if( !curl_setopt( $ch, CURLOPT_URL, urldecode( $d['url'] ) ) || !curl_setopt( $ch, CURLOPT_FILE, $fp ) || !curl_setopt( $ch, CURLOPT_HEADER, 0 ) || !curl_exec( $ch ) )
|
||||
$this->jsonResponse( array( "status" => "ERROR", "message" => $this->l['error']." ".curl_error( $ch ) ) );
|
||||
else {
|
||||
$this->jsonResponse( array( "status" => "OK", "message" => $this->l['file_upload_success'] ) );
|
||||
|
@@ -950,7 +950,7 @@ function IFM( params ) {
|
||||
dir: ifm.currentDir,
|
||||
filename: filename,
|
||||
method: method,
|
||||
url: encodeURI( url )
|
||||
url: url
|
||||
}),
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
|
@@ -812,7 +812,7 @@ f00bar;
|
||||
else {
|
||||
$fp = fopen( $filename, "w" );
|
||||
if( $fp ) {
|
||||
if( !curl_setopt( $ch, CURLOPT_URL, $d['url'] ) || !curl_setopt( $ch, CURLOPT_FILE, $fp ) || !curl_setopt( $ch, CURLOPT_HEADER, 0 ) || !curl_exec( $ch ) )
|
||||
if( !curl_setopt( $ch, CURLOPT_URL, urldecode( $d['url'] ) ) || !curl_setopt( $ch, CURLOPT_FILE, $fp ) || !curl_setopt( $ch, CURLOPT_HEADER, 0 ) || !curl_exec( $ch ) )
|
||||
$this->jsonResponse( array( "status" => "ERROR", "message" => $this->l['error']." ".curl_error( $ch ) ) );
|
||||
else {
|
||||
$this->jsonResponse( array( "status" => "OK", "message" => $this->l['file_upload_success'] ) );
|
||||
|
Reference in New Issue
Block a user