Merge pull request #8 from gustavotrott/pr-15990-ppt-fix
Add exception to accept ppt with pptx mime
This commit is contained in:
commit
6d1c7f6bd3
@ -44,8 +44,14 @@ public class MimeTypeUtils {
|
||||
};
|
||||
|
||||
public Boolean extensionMatchMimeType(String mimeType, String finalExtension) {
|
||||
if(EXTENSIONS_MIME.containsKey(finalExtension.toLowerCase())) {
|
||||
return EXTENSIONS_MIME.get(finalExtension.toLowerCase()).equalsIgnoreCase(mimeType);
|
||||
if(EXTENSIONS_MIME.containsKey(finalExtension.toLowerCase()) &&
|
||||
EXTENSIONS_MIME.get(finalExtension.toLowerCase()).equalsIgnoreCase(mimeType)) {
|
||||
return true;
|
||||
} else if(EXTENSIONS_MIME.containsKey(finalExtension.toLowerCase() + 'x') &&
|
||||
EXTENSIONS_MIME.get(finalExtension.toLowerCase() + 'x').equalsIgnoreCase(mimeType)) {
|
||||
//Exception for MS Office files named with old extension but using internally the new mime type
|
||||
//e.g. a file named with extension `ppt` but has the content of a `pptx`
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -45,7 +45,6 @@ import org.bigbluebutton.web.services.turn.RemoteIceCandidate
|
||||
import org.json.JSONArray
|
||||
|
||||
import javax.servlet.ServletRequest
|
||||
import java.util.regex.*
|
||||
|
||||
class ApiController {
|
||||
private static final Integer SESSION_TIMEOUT = 14400 // 4 hours
|
||||
|
Loading…
Reference in New Issue
Block a user