简体   繁体   English

如何从 react-native 应用程序查看 google 驱动器图像和视频文件?

[英]How can I view the google drive image and video files from the react-native app?

I want to display pictures in my react native app, but only know how to show the pictures from other url's but don't know how can I show the images from the drive in my app,我想在我的 react native 应用程序中显示图片,但只知道如何显示来自其他 url 的图片,但不知道如何在我的应用程序中显示来自驱动器的图像,

  <Image
      style={{width:50, height: 50}}
      source={{uri: 'https://facebook.github.io/react-native/img/tiny_logo.png'}}
   />

Above code displays the picture from the link but how can I display the pictures which are in google drive?上面的代码显示了链接中的图片,但我怎样才能显示谷歌驱动器中的图片? tried giving sharable links as uri but no use.尝试将可共享链接作为 uri 提供,但没有用。

Thanks in advance.提前致谢。

  1. Shift + ctrl + I while preview of image opened on Google Drive page. Shift + ctrl + I同时在 Google Drive 页面上打开图像预览。
  2. Shift + ctrl + c and click on the image Shift + ctrl + c并点击图片
  3. Copy the URL in the inspection panel and put it as a source复制检查面板中的URL作为源

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM