New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature (api): Add preUploadedPresentation param to API's /create via GET #18953
Conversation
Looks like override-not-working.no-audio.mp4 |
It overrides the default.pdf even when the URL is invalid. invalid-url.no-audio.mp4 |
Even when I set invalid-url-override.no-audio.mp4 |
O tried to upload a shortened URL but it didn't work, and I didn't see any error in bbb-web logs: Whereas this link used to work in the Pre Uploaded Presentation via POST request. |
bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/ApiController.groovy
Outdated
Show resolved
Hide resolved
…name along with URL
bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/ApiController.groovy
Outdated
Show resolved
Hide resolved
bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/ApiController.groovy
Outdated
Show resolved
Hide resolved
…/controllers/ApiController.groovy
…/controllers/ApiController.groovy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Kudos, SonarCloud Quality Gate passed! |
Automated tests Summary🚨 Test workflow has failedClick here to check the action test reports |
Added an example in the 2.7 docs: #18990 |
What does this PR do?
It basically implements the pre-upload presentation via GET, so now it is possible to pass a download URL to the create endpoint.
The behavior now is: if one passes in
preUploadedPresentation
, then this presentation will override thedefault.pdf
, sincepreUploadedPresentationOverrideDefault=true
by default in theapplication.properties
. To avoid that, it is necessary to also send inpreUploadedPresentationOverrideDefault=false
.Closes Issue(s)
Closes #18924
More
Notice that all requirements of precedence are respected.
Naming discussion:
One of the main concerns when doing this feature was how to name the presentation sent in the parameter, when the only thing we have is the URL to access it. It can be of the form:
So the idea is we are going to let the user specify the presentation's name with a new parameter
preUploadedPresentationName
, and that will have the priority.If the name is not specified, it will enter a flow to deduce it from the URL provided.
For the first 2 cases mentioned previously (the examples I gave for the URLs), the links have the extension plugged in, so it is pretty straight forward, the
FilenameUtils
will extract the name out (with it's logic) and done.But for the last case, we will consider that if there is no extension explicitly written in the URL, that URL doesn't have the filename in it. And therefore we have no clue what to guess (once we do not want to request the link to see the header, or else we would have to do some more validations due to possible security issues). With that in mind, we will simply name the presentation
untitled.<extension>
and the extension will be guessed further in the flow based on the mimetype.