-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Redirect to correct urls #3574
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
Redirect to correct urls #3574
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3574 +/- ##
=======================================
Coverage 79.06% 79.06%
=======================================
Files 105 105
Lines 9786 9786
Branches 1571 1571
=======================================
Hits 7737 7737
Misses 1568 1568
Partials 481 481
Continue to review full report at Codecov.
|
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.
One URL is not quite right and a few minor nitpicks. Otherwise LGTM! Thanks @oke-aditya!
Feel free to merge this. I have fixed the lint and changes look fine from my side 😄 |
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.
Hey @oke-aditya, we had some internal discussion about this and we need to revert some changes you made:
- URLs that redirect to a completely other location should probably stay the same as before. For example that redirection from
Caltech
to Google Drive is an implementation detail on there side. They still list the original URL on the website and thus we should probably keep it. - I'm not sure if adding
/edit
to ID for files on Google Drive works for us (we don't have a test for this), but it is at least conceptually wrong. This should probably be fixed directly indatasets.utils.download_file_from_google_drive()
.
I'm sorry for the back and forth.
No worries @pmeier . |
Since |
I had a second thought on adding |
@oke-aditya Thanks for looking into that!
I didn't know that! Is there documentation that describes this, i.e. the
Completely agree. |
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.
Thanks!
Hey @pmeier I did a little experiment if I will show an example here. Link1 = https://drive.google.com/drive/folders/1rb8fyciuy-uYIPoK2D_wKtaJBGLDxiuH?usp=sharing Try opening all the links in incognito / private windows (it is completely safe the photo in it is Ubuntu Wallpaper permissive license). Link1 and Link4 would open and work file. But Link2 and Link3 won't. So it always safer to redirect to link4 which is the base url. Notice that you won't be able to edit this folder, it is view only!. |
@oke-aditya Awesome, thanks a lot for the investigation! |
Summary: * redirect the urls * adds /edit * Apply suggestions from code review * fix lint * undo urls Reviewed By: NicolasHug Differential Revision: D27706939 fbshipit-source-id: a4a35dc5d3e873c6bb7e3d713b03d6097520c0fc Co-authored-by: Philip Meier <github.pmeier@posteo.de> Co-authored-by: Francisco Massa <fvsmassa@gmail.com>
Fixes #3569 .
Fix redirect for
For google drive in the case of
CelebA
andWIDERFace
it simply redirects towww.drive.google.com/<url>/edit
instead ofwww.drive.google.com/<url>
I have modified the file id and added
/edit
to it. Hope it works.