vorburger commented on a change in pull request #650: Adding vnd.ms-excel
support
URL: https://github.com/apache/fineract/pull/650#discussion_r350015681
##########
File path:
fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/service/BulkImportWorkbookServiceImpl.java
##########
@@ -99,8 +99,12 @@ public Long importWorkbook(String entity, InputStream
inputStream, FormDataConte
final String fileExtension =
Files.getFileExtension(fileDetail.getFileName()).toLowerCase();
ImportFormatType format = ImportFormatType.of(fileExtension);
if (!fileType.contains("msoffice")) {
- throw new
GeneralPlatformDomainRuleException("error.msg.invalid.file.extension",
- "Uploaded file extension is not recognized.");
+ // We had a problem where we tried to upload the
downloaded file from the import options, it was somehow changed the
+ // extension we use this fix.
+ if (!fileType.contains("application/vnd.ms-excel")) {
Review comment:
the double `if` is a little bit weird; it would be nicer if this was a
single if, with an `&&` ?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services