diff options
author | 2019-08-23 16:49:45 -0400 | |
---|---|---|
committer | 2019-08-23 16:51:05 -0400 | |
commit | a3a04c5887779e9ca8024a3e87ece109b8d9b0c1 (patch) | |
tree | d4c36f55aaba1f5a76bdf95308a0dc5ff21b425a /ecomp-portal-widget-ms/widget-ms/src/main/java/org | |
parent | 7ce177cd99096772ff42ef89d8820070c687fd9b (diff) |
Onboarding Page Account Admin Change
Issue-ID: PORTAL-644
Change-Id: I95e43b1a2d12dcb5a4bc56d374cc6d30d8aae3f3
Signed-off-by: statta <statta@research.att.com>
Diffstat (limited to 'ecomp-portal-widget-ms/widget-ms/src/main/java/org')
-rw-r--r-- | ecomp-portal-widget-ms/widget-ms/src/main/java/org/onap/portalapp/widget/service/impl/StorageServiceImpl.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ecomp-portal-widget-ms/widget-ms/src/main/java/org/onap/portalapp/widget/service/impl/StorageServiceImpl.java b/ecomp-portal-widget-ms/widget-ms/src/main/java/org/onap/portalapp/widget/service/impl/StorageServiceImpl.java index 18611728..7a35ba4e 100644 --- a/ecomp-portal-widget-ms/widget-ms/src/main/java/org/onap/portalapp/widget/service/impl/StorageServiceImpl.java +++ b/ecomp-portal-widget-ms/widget-ms/src/main/java/org/onap/portalapp/widget/service/impl/StorageServiceImpl.java @@ -39,6 +39,7 @@ import org.springframework.web.multipart.MultipartFile; public class StorageServiceImpl implements StorageService { private static final Logger logger = LoggerFactory.getLogger(StorageServiceImpl.class); + private final String TMP_PATH = "/tmp/"; @Autowired private SessionFactory sessionFactory; @@ -98,13 +99,14 @@ public class StorageServiceImpl implements StorageService { throw new StorageException( "StorageServiceImpl.checkZipFile: Failed to store empty file " + file.getOriginalFilename()); } - String fileLocation = file.getOriginalFilename(); + + String fileLocation = TMP_PATH+file.getOriginalFilename(); logger.debug("StorageServiceImpl.checkZipFile: store the widget to:" + fileLocation); convFile = new File(fileLocation); try(FileOutputStream fos = new FileOutputStream(convFile)){ fos.write(file.getBytes()); } - map = unzipper.unzip_db(fileLocation, ".", "tempWidgets"); + map = unzipper.unzip_db(fileLocation, TMP_PATH, "tempWidgets"); convFile.delete(); } catch (IOException e) { logger.error("StorageServiceImpl.checkZipFile: Failed to store file " + file.getOriginalFilename(), e); |