mirror of
https://github.com/nextcloud/server.git
synced 2026-04-21 06:08:46 -04:00
Decode json response for admin exports
This commit is contained in:
parent
e5ebbacc9e
commit
ecc596534a
1 changed files with 3 additions and 1 deletions
|
|
@ -28,10 +28,12 @@ OC_Util::checkAppEnabled('admin_migrate');
|
|||
// Export?
|
||||
if (isset($_POST['admin_export'])) {
|
||||
// Create the export zip
|
||||
if( !$path = OC_Migrate::export( null, $_POST['export_type'] ) ){
|
||||
$response = json_decode( OC_Migrate::export( null, $_POST['export_type'] ) );
|
||||
if( !$response->success ){
|
||||
// Error
|
||||
die('error');
|
||||
} else {
|
||||
$path = $response->data;
|
||||
// Download it
|
||||
header("Content-Type: application/zip");
|
||||
header("Content-Disposition: attachment; filename=" . basename($path));
|
||||
|
|
|
|||
Loading…
Reference in a new issue