Skip to content

Commit fac337f

Browse files
committed
Bugfixes for Mashape
1 parent d0ace99 commit fac337f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

app/api/class/Mashape.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public static function convertFile($filename, $data, $format = "pdf")
5656
$user = $user->get('Email');
5757
else
5858
$user = "SERVER";
59-
$filename = $user . "_" . $filename;
59+
$filename = $user . " " . $filename;
6060
file_put_contents($_SERVER['DOCUMENT_ROOT'] . "\\app\\files\\temp_" . $filename, $data);
6161
$response = Unirest::post(
6262
"https://community-docverter.p.mashape.com/convert",
@@ -72,6 +72,6 @@ public static function convertFile($filename, $data, $format = "pdf")
7272
file_put_contents($_SERVER['DOCUMENT_ROOT'] . "\\app\\files\\" . $filename . "." . $format, $response->raw_body);
7373
unlink($_SERVER['DOCUMENT_ROOT'] . "\\app\\files\\temp_" . $filename);
7474
header($_SERVER['DOCUMENT_ROOT'] . "\\app\\files\\" . $filename . "." . $format);
75-
return "\\app\\files\\" . $filename . "." . $format;
75+
return "/app/files/" . $filename . "." . $format;
7676
}
7777
}

index.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@
163163
MashapeManager::addRoutes($app);
164164
RoomManager::addRoutes($app);
165165
AssignmentManager::addRoutes($app);
166+
FacebookManager::addRoutes($app);
166167

167168
$app->run();
168169
?>

0 commit comments

Comments
 (0)