I'm building a web site using Ruby Volt for a publication. I'd like users to be able to upload images that will be stored on Google Drive. The Google Drive will belong to the publication, not to the site users who are uploading the images. If possible, I'd like the fact the images are being stored on Google Drive to be transparent to the site users.
The publication staff will access the images via their Google Drive.
My head is swimming with the Google documentation… Does anybody know if this is doable? If it is can you offer any pointers to example code or suggestions on how to get started?
So I can't help with the google drive API side of things, but in Volt, you can use a HttpController to post a input type="field". In the http controller, you can call params._field_name to get the data from rest. That will provide a tempfile you can copy out. Once I get time I'll make a demo app for file upload.
Related
I am new to Google Drive API. I read on the google quickstart guide that we can access list of documents from our drive but can we do the same with the documents shared privately to us. Like if someone gave me view access of the document from their drive, Can I download it with Google drive API? I am trying to do this in a spring-boot application.
Yes, you can use Files.list() to list the files shared with you. To do so you should use the q parameter to filter those files. For example, you may use 'SaumyaShah#gmail.com' in readers if you want to list the files that have been shared with you. Here you can learn more about the q parameter. For further information about how to download those files, please follow this guide. Feel free to leave a comment if you still have doubts about these approaches.
I am currently trying to generate a url to link to a public Google Photos gallery. I am aware from some research that all calls regarding Google Photos go through the Picasa API. So, by running file_get_contents on the following URL, I have retrieved a full listing of all public albums on my user account
http://picasaweb.google.com/data/feed/api/user/<USERNAME>?alt=json&kind=album&hl=en_US
This works perfectly and includes links to the gallery in Picasa. However, I would much prefer to be able to generate a link to the corresponding Google Photos gallery. On sharing Google photos, a shortened url is generated, like
https://goo.gl/photos/code
I was wondering if there was any possible way, given the album ID from the API call that such a link could be generated
Previous questions on this subject haven't generated much response unfortunately - is anyone aware of any such Google link generation capability?
I already have an upload function in Google API and Dropbox API, but the problem is it can only upload small files like images but it cant upload big files like videos. Please help what do I need to add in the code.
This is my code in Google
This is my code in Dropbox
Please help..
I have a twitter share button on a webpage. I have submitted my website for twitter cards, and it is approved. I am using the twitter card tags correctly, but I have troubles to get the images appear on the time-line. On the twitter timeline I only see text and the URL. Only when clicking on the tweet, an image appears below (the tweet expands).
I would like to have this image appear on the timeline, without needing to expand the tweet. Is this possible, or am is it necessary to use a service like twitpic or flickr to make this happen?
My first thought is that this is not possible because twitter only accepts certain image websites to publish their images on the twitter timeline, but I cannot find a twitter dev source that confirms this.
This is the normal behaviour for the twitter card.
Please read https://dev.twitter.com/cards/troubleshooting#timeline
The second point of the troubleshooting might be the solution you're looking for: "For photos and animated GIFs, upload the media directly with the Tweet or consider using the Twitter API to upload media." You can also explore the other solutions offered.
UPDATE: It looks like the solution I was proposing refers to sharing content directly from twitter, so it's not an option. See this twitter community thread
I'm looking to transfer ownership of a specific Google Docs file using the Google Apps API. There are many accounts on a single Google Apps domain. There are many files I would like to transfer so I do not want to do it manually.
In the UI I've only seen the ability to transfer ownership of all files from a particular user rather than individual files.
I've looked through the GitHub page for the google-api-ruby-client gem, but I was unable to come up with a solution. Can someone point me in the right direction or post an example?
You'll need to use the Google Drive API. Specifically the Permissions "update" method.
First find/get the File ID, using the Files.List method, which will allow you to search using a query. Then use the Permissions.Update (or Patch) method, making sure to set the transferOwnership parameter to True.
Full documentation is here: Google Drive API - Permissions