-
Notifications
You must be signed in to change notification settings - Fork 172
E2561. Finish up SubmittedContentController #228
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
base: main
Are you sure you want to change the base?
Conversation
…ts for submitted content API
Fix Download action test cases
Generated by 🚫 Danger |
|
|
||
| # Validate that the hyperlink is not blank | ||
| if submit_link.blank? | ||
| return render_error('Hyperlink submission cannot be blank. Please provide a valid URL.', :bad_request) |
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.
use validates_url gem to validate the submitted hyperlink
| end | ||
|
|
||
| # Validate file extension against allowed types | ||
| unless valid_file_extension?(uploaded_file_name(uploaded)) |
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.
better to remove this check
| @@ -0,0 +1,38 @@ | |||
| module FileHelper | |||
| extend self | |||
| # Replace invalid characters with underscore | |||
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.
"replace whitespace characters" would make much more sense
No description provided.