Package io.dataease.plugins.common.util
Class GlobalFileUtil
- java.lang.Object
-
- io.dataease.plugins.common.util.GlobalFileUtil
-
@Component public class GlobalFileUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description GlobalFileUtil()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static org.springframework.http.ResponseEntity<org.springframework.core.io.ByteArrayResource>down(String fileId, String fileName)static StringfilePathById(String fileId, String suffix)voidsetRoot(String root)static org.springframework.http.ResponseEntity<byte[]>showPicture(String fileId)static Stringupload(byte[] bytes, String suffix)
-
-
-
Method Detail
-
setRoot
@Value("${dataease.busiFilePath:/opt/dataease/data/business/}") public void setRoot(String root)
-
showPicture
public static org.springframework.http.ResponseEntity<byte[]> showPicture(String fileId)
-
down
public static org.springframework.http.ResponseEntity<org.springframework.core.io.ByteArrayResource> down(String fileId, String fileName) throws Exception
- Throws:
Exception
-
-