Package at.letto.basespringboot.service
Class BaseUploadService
java.lang.Object
at.letto.basespringboot.service.BaseUploadService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionhandleUpload
(org.springframework.web.multipart.MultipartFile multipartFile, String uploadDirectory, String uploadFilename) Lädt ein Multipart-File auf den Server hoch
-
Constructor Details
-
BaseUploadService
public BaseUploadService()
-
-
Method Details
-
handleUpload
public File handleUpload(org.springframework.web.multipart.MultipartFile multipartFile, String uploadDirectory, String uploadFilename) throws Exception Lädt ein Multipart-File auf den Server hoch- Parameters:
multipartFile
- Multipart-Teil des Formulares können Zieldateiname "uploadFilename" und Zielverzeichnis "uploadDirectory" als Input-Element angegeben werden.uploadDirectory
- Verzeichnis in das hochgeladen werden soll wenn im Formular nicht anders angegeben- Returns:
- File Element auf die heruntergeladene Datei
- Throws:
Exception
- Fehlermeldung wenn etas nicht funktioniert hat
-