Initial commit
This commit is contained in:
commit
05c65aad4d
155 changed files with 93617 additions and 0 deletions
22
viewer/php/editor.php
Normal file
22
viewer/php/editor.php
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
$configFile = 'modules/dfg_3dviewer/viewer/config.json';
|
||||
|
||||
if (!file_exists($configFile)) {
|
||||
die("Error: Config file not found.");
|
||||
}
|
||||
|
||||
$configData = json_decode(file_get_contents($configFile), true);
|
||||
|
||||
if (json_last_error() !== JSON_ERROR_NONE) {
|
||||
die("Error decoding JSON: " . json_last_error_msg());
|
||||
}
|
||||
|
||||
$path = './'.$_POST['path'];
|
||||
$filename = $_POST['filename'];
|
||||
|
||||
file_put_contents($path . "metadata/" . $filename . "_viewer.json", $result);
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue