@Transactional("blTransactionManagerAssetStorageInfo")
@Override
public void createStaticAssetStorageFromFile(MultipartFile file, StaticAsset staticAsset) throws IOException {
if (StorageType.DATABASE.equals(staticAsset.getStorageType())) {
StaticAssetStorage storage = staticAssetStorageDao.create();
storage.setStaticAssetId(staticAsset.getId());
Blob uploadBlob = staticAssetStorageDao.createBlob(file);
storage.setFileData(uploadBlob);
staticAssetStorageDao.save(storage);
} else if (StorageType.FILESYSTEM.equals(staticAsset.getStorageType())) {
FileWorkArea tempWorkArea = broadleafFileService.initializeWorkArea();
// Convert the given URL from the asset to a system-specific suitable file path
String destFileName = FilenameUtils.normalize(tempWorkArea.getFilePathLocation() + File.separator + FilenameUtils.separatorsToSystem(staticAsset.getFullUrl()));