Merge pull request #15860 from zhem0004/defaultPresentationNull

This commit is contained in:
Gustavo Trott 2022-10-19 17:48:44 -03:00 committed by GitHub
commit d9e6e5c8bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 8 deletions

View File

@ -203,7 +203,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<property name="testRoomMock" value="${beans.presentationService.testRoomMock}"/>
<property name="testPresentationName" value="${beans.presentationService.testPresentationName}"/>
<property name="testUploadedPresentation" value="${beans.presentationService.testUploadedPresentation}"/>
<property name="defaultUploadedPresentation" value="${beans.presentationService.defaultUploadedPresentation}"/>
<property name="defaultUploadedPresentation" value="${beans.presentationService.defaultUploadedPresentation:null}"/>
<property name="presentationBaseUrl" value="${presentationBaseURL}"/>
<property name="preUploadedPresentationOverrideDefault" value="${beans.presentationService.preUploadedPresentationOverrideDefault}"/>
</bean>

View File

@ -1412,9 +1412,8 @@ class ApiController {
def presId
if (presFilename == "" || filenameExt == "") {
log.debug("Upload failed. Invalid filename " + presOrigFilename)
uploadFailReasons.add("invalid_filename")
uploadFailed = true
log.debug("presentation is null by default")
return
} else {
String presentationDir = presentationService.getPresentationDir()
presId = Util.generatePresentationId(presFilename)
@ -1423,13 +1422,13 @@ class ApiController {
def newFilename = Util.createNewFilename(presId, filenameExt)
def newFilePath = uploadDir.absolutePath + File.separatorChar + newFilename
if (presDownloadService.savePresentation(meetingId, newFilePath, address)) {
pres = new File(newFilePath)
} else {
if(presDownloadService.savePresentation(meetingId, newFilePath, address)) pres = new File(newFilePath)
else {
log.error("Failed to download presentation=[${address}], meeting=[${meetingId}], fileName=[${fileName}]")
uploadFailReasons.add("failed_to_download_file")
uploadFailed = true
uploadFailed = true
}
} else {
log.error("Null presentation directory meeting=[${meetingId}], presentationDir=[${presentationDir}], presId=[${presId}]")
uploadFailReasons.add("null_presentation_dir")