diff --git a/src/shogun2-core/shogun2-service/src/main/java/de/terrestris/shogun2/service/FileService.java b/src/shogun2-core/shogun2-service/src/main/java/de/terrestris/shogun2/service/FileService.java
index <HASH>..<HASH> 100644
--- a/src/shogun2-core/shogun2-service/src/main/java/de/terrestris/shogun2/service/FileService.java
+++ b/src/shogun2-core/shogun2-service/src/main/java/de/terrestris/shogun2/service/FileService.java
@@ -59,12 +59,11 @@ public class FileService<E extends File, D extends FileDao<E>>
 	 * @return
 	 * @throws Exception
 	 */
-	@SuppressWarnings("unchecked")
-	public File uploadFile(MultipartFile file) throws Exception {
+	public E uploadFile(MultipartFile file) throws Exception {
 
 		InputStream is = null;
 		byte[] fileByteArray = null;
-		File fileToPersist = getEntityClass().newInstance();
+		E fileToPersist = getEntityClass().newInstance();
 
 		try {
 			is = file.getInputStream();
addresses note of @buehner