All I wanted to do is: 1)Upload file to Google drive - done 2)Get shareable link of this uploaded file and set its permissions to "Anyone with the link can view" using Google drive Java API v3.
After file upload i tried doing file.getWebViewLink(); but the same is coming as null. Any idea how to do this?
I would recommend you checking the Java Quickstart first and try modifying the code. There's a line there like service.files().list() which you can try to set to service.files().get().setFields("webViewLink"); to fetch the webViewlink property.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With