HEX
Server: LiteSpeed
System: Linux houston.panomity.com 6.8.0-100-generic #100-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 13 16:40:06 UTC 2026 x86_64
User: nudepix (1011)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //opt/kw-schueler.bak.21032025/download_usdz.py
#!/usr/bin/env python3
"""
Dieses Skript lädt eine Beispiel-USDZ-Datei herunter,
die sicher in AR Quick Look funktioniert.
"""

import os
import requests

# URL einer bekannten funktionierenden USDZ-Datei
USDZ_URL = "https://devimages-cdn.apple.com/augmented-reality/models/solar-system/sol.usdz"

# Zielpfad für die USDZ-Datei
TARGET_DIR = "/opt/klausurenweb-schueler/static"
TARGET_FILE = os.path.join(TARGET_DIR, "radar_placeholder.usdz")

def download_usdz():
    """Lädt eine USDZ-Beispieldatei herunter."""
    print(f"Lade USDZ-Datei von {USDZ_URL} herunter...")
    
    try:
        response = requests.get(USDZ_URL, stream=True)
        response.raise_for_status()
        
        with open(TARGET_FILE, 'wb') as file:
            for chunk in response.iter_content(chunk_size=8192):
                file.write(chunk)
        
        print(f"USDZ-Datei erfolgreich nach {TARGET_FILE} heruntergeladen.")
        return True
    except Exception as e:
        print(f"Fehler beim Herunterladen der USDZ-Datei: {e}")
        return False

if __name__ == "__main__":
    if os.path.exists(TARGET_FILE):
        print(f"Die Datei {TARGET_FILE} existiert bereits. Überschreibe...")
        
    os.makedirs(TARGET_DIR, exist_ok=True)
    download_usdz()