Skip to content

Conversation

@hudazaan
Copy link

Description

This PR fixes #6986

Fixed the profile picture validation to accept Google Drive links. Previously, when users tried to paste Google Drive links as profile pictures, the form showed the error "URL must point to an image file (jpg, jpeg, png, svg, webp or gif)".

Notes for Reviewers

  • This follows the expected behavior of accepting Google Drive links that point to image files
  • No breaking changes to existing functionality
  • Maintains file extension validation for non-Google Drive URLs

Signed commits

  • Yes, I signed my commits.

@l5io
Copy link
Contributor

l5io commented Oct 16, 2025

🚀 Preview for commit 0bc92e9 at: https://68f13121a6457b84033b3eb4--layer5.netlify.app

Copy link
Contributor

@Fireentity Fireentity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thanks for this contribution! The logic is looking good.

We can simplify the validation by using a single regular expression. This makes the intent clearer and is easier to maintain than multiple includes() checks.

const validGoogleDrivePattern = /drive\.google\.com\/file\/d\/.+\/(view|uc\?)/;

if (value.includes('drive.google.com') && !validGoogleDrivePattern.test(value)) {
  error = "Please provide a direct Google Drive file link.";
} else {
  // ...
}

I also noticed the DCO check is failing. This happens when commits are not signed off. https://docs.meshery.io/project/contributing

@FreemanBoss
Copy link
Contributor

This is a very important to work on as I faced this issue through while filling the form. Between, the DCO checks is failing.

@hudazaan
Copy link
Author

Thankyou for the feedback. I'll simplify the validation and also fix the DCO check issue.

@Namanv0509
Copy link
Member

@hudazaan thanks for your contribution , you can check https://github.com/layer5io/layer5/pull/7041/checks?check_run_id=53083532468 to fix the DCO error

@l5io
Copy link
Contributor

l5io commented Oct 18, 2025

🚀 Preview for commit a4dcc18 at: https://68f3b03153e83cd59ef816d1--layer5.netlify.app

@Rajesh-Nagarajan-11
Copy link
Member

DCO Failed ⚠️ and @Fireentity Thanks for the review

@Rajesh-Nagarajan-11
Copy link
Member

Thank you for your contribution!
Let's discuss this during the website call today at 5:30 PM IST | 7 AM CT
Add it as an agenda item to the meeting minutes, if you would 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Profile picture URL validation rejects valid image links from Google Drive

6 participants