项目中,常常需要用到文件的上传和下载,上传和下载功能实际上是对Document对象进行insert和查询操作.本篇演示简单的文件上传和下载,理论上文件上传后应该将ID作为操作表的字段存储,这里只演示文件上传到Document对象中. 一.文件上传功能 apex代码 public with sharing class FileUploadUsedTransientController { public transient Blob fileUploadBody{get;set;} public S…
控制器代码(TestController.class.php) <?php namespace Home\Controller; use Home\Controller\EmptyController; class TestController extends EmptyController { public function test() { if(empty($_POST['submit'])) { $this->display(); } else { $upload = new \Thi…