I'm developing an iOS app that generate video files and have a social gallery for users to display their clips. After a lot of research I found that Google Drive would be perfect to fit my needs so I did some testing and sucessfully made the app upload the file to GDrive and everything.
Now I need to stream the uploaded file in a MPMoviePlayerViewController, for that I would need some kind of direct link, I'm right? After my initial tests I used the variable WebContentLink as a source URL and it worked flawlessly, I was really happy with the result, however now it doesn't work anymore, I don't know what happened and I think the method that I used is not realiable? I tried all the other possible links and none of them seems to work.
Can someone give a guidance about if this is really supported by Google Drive and how it's the best way to archive that in a reliable way?
Thank you very much !
I too encounter the same error when I try to download 28 times (testing) the same 24mb file.
However I realise if I am to download using the content owner ID, it does allow downloading after the 28th time
https://docs.google.com/a/onwardsct.com/uc?id=0ByvXJAlpPqQPYWNqY0V3MGs0Ujg&export=download
Sorry, you can't view or download this file at this time.
Too many users have viewed or downloaded this file recently. Please try accessing the file again later. If the file you are trying to access is particularly large or is shared with many people, it may take up to 24 hours to be able to view or download the file. If you still can't access a file after 24 hours, contact your domain administrator.
The experience for streaming files natively is not ideal right now, sorry. It is something Google are working on.
You are doing this correctly though. The webContentLink should use the user's quota, and that should be enough for most cases. If you can give some specific numbers, we can look at it.
The embed link is the best way to show it on a mobile device, but as you say won't work everywhere.
yes, google drive can be used for hosting and stream videos as you like. It can also be used as demo server for web projects. Here is how to host a website on Google drive.
Related
Hey there fellow devs,
I have come across a problem while migrating our app to the new API 30 standards with the storage access framework (SAF).
I have successfully migrated the file structure and am now using the internal (FilesDir) paths.
Getting images with the MediaStore-Api is also working quite nicely.
But there is one big issue I just can't seem to fix.
In our app, we are using the API "Mapsforge" for Offline-Maps.
This API is using a Java.IO.File-Object we get from a path to a ".map" file which is almost 2GB large.
This file does not come from us, it is a file managed by the customer and put onto the device for us to use, since all the ".Map"-Files are custom.
Since the SAF is returning an Android.Net.Uri, I can't seem to convert it to a Java.IO.File without copying the contents of the file and therefore using even more storage on the device.
Is there any way to use the SAF to get a Java.IO.File-Object I can use in code?
If not, then Android 11 is making it very hard for my Customer to manage his storage.
This API is using a Java.IO.File-Object we get from a path to a ".map" file which is almost 2GB large.
With luck, Mapsforge will offer more flexible APIs in the future. You may wish to contact them about their recommendations.
Is there any way to use the SAF to get a Java.IO.File-Object I can use in code?
No. After all, the user might choose something on Google Drive or another cloud storage provider, rather than a local file. Or, they might choose a file that is inaccessible to your app. Or, they might choose content that is stored in an encrypted file, which needs to be decrypted by the document provider. And so on.
I am new to objective c and still learning. I am making an app for my project in which user can download the whole website or webpage for later browsing..so i need some guidance, so if any one can give some suggestion that would be great
There are many ways to achieve what you asked for. Either by saving the websites data in temporary folder or you may save the whole site as pdf.
I can't seem to find information on how to print files through google app script.
I found an answer in this website but it doesn't work, I think it's because it's 3 years old and google script has had some changes.
google app script print button
You can't print directly from GAS (I've searched far and wide), as described in the post that you linked. However it is possible to create a downloadable document with the desired content and then pass that blob off to the client for downloading (depending on wether you're still working in GAS or a web app environment).
Personally, I felt that it was a headache to deal with how each browser deals with downloading blobs. Therefore I usually go one of these two routes: provide a public downloadable link from the drive of the owner of the script and then push it to the user to download, OR just email the document to the user and let their email client handle downloading the blob.
Alternatively, if this is an add-on, you can make it so that the document is downloaded directly to the users own drive and just inform them where the document will be located.
I am making an iphone application which is pretty much like forum. People can ask question and upload a pdf/doc file along with the question. Is there a way to access the pdf/doc file in iphone when user clicks upload button and send the file to server?
I have implemented the feature for image for which I used UIImagePicker to pick the image and send it to the server with http request. But I am completely lost and have no idea how to handle pdf/doc files in same manner.
Any help/suggestion really appreciated. Thanks in advance.
If you want to upload PDF and Doc files, then you can integrate Dropbox and Google Drive in your app and then select the files ,as Apple does not have centralised storage. If you notice Apple also chooses the documents from Google Drive while composing a mail.
So implementing and integrating google drive and Dropbox would be a good option.
Here is the link for Dropbox https://www.dropbox.com/developers-v1/core/sdks/ios
Here is the link for Google Drive https://developers.google.com/drive/ios/quickstart
Implementing Google drive is a bit hard but dropbox is quite simple.
Wish it saves your time. All the best!
I think you are looking for a combination of two things (both have been discussed here before and I include the links below).
(1) store a PDF. There are many options but the best way is to allow coredata to save outside the persistent store. Then store the reference to the file in core date. See: Insert a PDF file into Core Data?
(2) send the file to the server. There are many options for this as well. The fastest is probably to use a wrapper library such as ASIHTTPRequest. See: File Upload to HTTP server in iphone programming
I'm building a Rails app that has videos that users will see on the app and they will pay for it. So I need to ensure that no one can download the video. How can I protect, for example, that someone go to the source code the page and find the link and download it?
You can't really do this in standard Rails techniques. If you are serving the file yourself: Dirty Web Video Secret: If You Can See It, You Can Steal It
You can’t guarantee that a video can’t be copied, but you can make it harder by limiting the people with access to the video, by letting those people know that you can track how they view your videos, and by putting some reasonable technological hurdles in the way.
If you are OK using flash, then you can look at Brightcove's solution that uses "DRM" http://support.brightcove.com/en/video-cloud/docs/protecting-your-videos-drm
What do most people do?
They use an authenticated URL that expires (to prevent emailing and sharing), and trust their users won't download and share the videos. They then ignore those that do share (or file DCMA takedown requests).