diff --git a/.gitmodules b/.gitmodules index 8fd6d0edc..9041a1a95 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "actors/sunbird-utils"] path = actors/sunbird-utils - url = https://github.com/project-sunbird/sunbird-utils.git - branch = release-2.8.0 + url = https://github.com/amit-tarento/sunbird-utils.git + branch = devcon-2020 diff --git a/actors/common/src/main/java/org/sunbird/learner/actors/fileuploadservice/FileUploadServiceActor.java b/actors/common/src/main/java/org/sunbird/learner/actors/fileuploadservice/FileUploadServiceActor.java index bc14cb3a2..70256a3fe 100644 --- a/actors/common/src/main/java/org/sunbird/learner/actors/fileuploadservice/FileUploadServiceActor.java +++ b/actors/common/src/main/java/org/sunbird/learner/actors/fileuploadservice/FileUploadServiceActor.java @@ -9,10 +9,7 @@ import org.sunbird.actor.router.ActorConfig; import org.sunbird.common.exception.ProjectCommonException; import org.sunbird.common.models.response.Response; -import org.sunbird.common.models.util.ActorOperations; -import org.sunbird.common.models.util.JsonKey; -import org.sunbird.common.models.util.ProjectLogger; -import org.sunbird.common.models.util.ProjectUtil; +import org.sunbird.common.models.util.*; import org.sunbird.common.models.util.azure.CloudService; import org.sunbird.common.models.util.azure.CloudServiceFactory; import org.sunbird.common.request.Request; @@ -47,12 +44,13 @@ private void processFileUpload(Request actorMessage) throws IOException { fileExtension = split[split.length - 1]; } } - String fName = "File-" + processId; + fileName = fileName.replace("."+fileExtension,""); + String fName = fileName +"-"+ processId; if (!StringUtils.isBlank(fileExtension)) { fName = fName + "." + fileExtension.toLowerCase(); ProjectLogger.log("File - " + fName + " Extension is " + fileExtension); } - + ProjectLogger.log("File name is :: "+fName, LoggerEnum.INFO.name()); File file = new File(fName); FileOutputStream fos = null; String avatarUrl = null;