Created
February 7, 2022 12:26
-
-
Save fatihkurcenli/af961e0dc08c6ce7a9721abefb7d869c to your computer and use it in GitHub Desktop.
FileUploadService
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Service | |
@Component | |
class FileUploadService { | |
fun uploadFileLocal(file: MultipartFile): Boolean { | |
return file.contentType?.let { | |
if (it.contains("mp4")) { | |
file.transferTo(File("C:\\xampp\\htdocs\\hls-server\\input\\" + file.originalFilename)) | |
val refactorVideoClass = RefactorVideoClass(file.originalFilename) | |
refactorVideoClass.start() | |
true | |
} else { | |
false | |
} | |
} ?: false | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment