Search code examples
autodesk-forgeautodesk-viewer

Storage viewer3D.min.js locally


When I tried to save the contents viewer3D.min.js received via the autodesk api, the viewer launch failed with an error.

Is it possible to keep viewer3D.min.js locally on your project?


Solution

  • Unfortunately, you cannot do that due to the Forge Viewer Usage Limitations, but you can implement a disconnected workflow by using the Web browser's cache. Please check out this blog post for details: https://forge.autodesk.com/blog/disconnected-workflow

    Usage Limitations

    The Autodesk Forge Viewer JavaScript must be delivered from an Autodesk hosted URL.

    See also the license declaration on the top of viewer3D.js and viewer3D.min.js

    /*!
     * LMV v7.68.0
     *
     * Copyright 2022 Autodesk, Inc.
     * All rights reserved.
     *
     * This computer source code and related instructions and comments are the
     * unpublished confidential and proprietary information of Autodesk, Inc.
     * and are protected under Federal copyright and state trade secret law.
     * They may not be disclosed to, copied or used by any third party without
     * the prior written consent of Autodesk, Inc.
     *
     * Autodesk Forge Viewer Usage Limitations:
     *
     * The Autodesk Forge Viewer JavaScript must be delivered from an
     * Autodesk-hosted URL.
     */