Hi,
I ha tried saving file into local storage path by using fileStorageName but in some places fileupload path are present in database so due to this i am unable to set copy files to local path as storage name and path cannot be defined.
Is there any way we can define storage at runtime or store file on basis of path.
FileRef putFileIntoStorage(UUID fileId, String fileName, FileStorage fileStorage);
FileRef putFileIntoStorage(UUID fileId, String fileName);
FileRef fileRef = null;
try{
FileStorage fileStorage = fileStorageLocator.getByName(fileStorageName);
fileRef = temporaryStorage.putFileIntoStorage(fileUploader.getId(), fileName, fileStorage);
}catch (Exception e){
e.printStackTrace();
return fileRef;
}
return fileRef;