bingher / forge
thinkphp6 plugin for AutoDesk Forge
dev-main
2021-06-09 00:38 UTC
Requires
- php: >=7.1.0
- autodesk/forge-client: ^1.0
- topthink/framework: ^6.0
This package is auto-updated.
Last update: 2024-11-09 08:10:00 UTC
README
实现DWG,DWF,RVT等文件的在线预览功能
安装
composer require bingher/forge
配置
配置文件config/forge.php
<?php
return [
'id' => 'autodesk forge client id',
'secret' => 'autodesk forge secret',
'prepend_bucketkey' => true,
'scope_internal' => ['bucket:create', 'bucket:read', 'data:read', 'data:create', 'data:write'],
'scope_public' => ['data:read'],
'bucket' => 'default',
];
示例
请看demo目录控制器及视图模板
建议
文件上传后,后端将文件上传到forge的oss,执行转换后返回urn记录到文件信息,预览采用demo的view方法通过get传参进行访问展示