direct google drive api download link with original file name - api

Good day
My problem i added the google drive api to get for files larger than 100mb no virus warning message from google drive
without google api its like this warning after clicking the link
https://drive.google.com/uc?export=download&id=1DyXunnAetC9Xc8Ur0poTmLWo7Yo3DylZ
i want the download without that warning message i mean a direct download
so i created an api and created an direct download link over this site
https://www.wonderplugin.com/online-tools/google-drive-direct-link-generator/
what i get is this
https://www.googleapis.com/drive/v3/files/11KPre5Rr3i9jqUr2QdlS-98Kl4wuaW6Z?alt=media&key=AIzaSyBybF13v7u-zXnruCs6uJ9I1QxoDFe0miw
it works correctly the warning message is bypassed but the name of the file is also changed to the file id this would look for customers of my cloud really scary like a virus and not like a apk file or something
so what i want is that the file name will be displayed by downloading and not something crazy like 037eugd98zr9u2dßih9ud237
without api the warning apears but the download file has the file name and not the ß30ru329fie2hfe crazy name :D
can someone help me?

Related

Is it possible to create a shortcut to a file that is in Google Drive?

I have asked this question so that they can respond that it is possible to create a shortcut for a file that is in the cloud, this access will be created in the device memory, what is the purpose of this: My application has integrated a function to upload a file to the cloud and then run it from a system application like player, gallery, among others, but without having to download anything, but from an application that is installed Installed on the device (nothing external). Thank you very much.
You may want to check Create a shortcut to a file. As mentioned,
To create a shortcut instead of a file stored in Drive, use the files.create method of the API and make sure you set the MIME type application/vnd.google-apps.drive-sdk. Do not upload any content when creating the file.
However, for Google Drive Android API, you may want to check Creating Files for more information.

Show content of a zip file in a browser, rather than downloading it

I have a log server, where users upload archives and view their content online when needed. Currently the server unzips files, right after receiving them. Unfortunately, my peers consumed all the drive space I had. I can free up a lot of space, if there's a way of storing ZIP archives, but feeding them to users as HTML page (same as default Apache's file browser).
I know there are solutions relying on JS, like:
http://gildas-lormeau.github.io/zip.js/demos/demo2.html
https://stuk.github.io/jszip/
or I can unzip them on demand at server side and provide link to a temporary folder. However, some time ago I've heard a browser can view an archive content if proper headers are sent from Apache/nginx. Apache's mod-deflate doesn't help much here and I can't find other docs - perhaps it's not possible after all?
Cheers.

Google Drive SDK - Upload and Virus Scan

I am building a batch upload process for Google Drive. I have been trying to confirm that all files upload via the API are also scanned for viruses and malware, but can not find any documentation on this. Does anyone know if 1: All files are scanned, 2: if there is a API call to get the scan results or if a standard error is cast back if a file is infected? IF you can point me to any documentation on this would be fantastic.
-Eg
You can use the EICAR virus test string to understand how Drive behaves with viruses. Here's a globally shared file named eicar.exe which is nothing more than a harmless string but which Google Drive's scan on download will detect as a virus.
You'll notice that:
Attempts to download my file with files.get(alt=media) will fail with "403: Only the owner can download abusive files."
Attempts to files.copy() my file into your own Drive will succeed. (This is a nice workaround when the file is not accessible with files.get() for various reasons).
Attempts to files.get(alt=media, acknowledgeAbuse=true) YOUR copy of the file should succeed.
So to answer your original question, you should be able to follow a files.insert() with a files.get(acknowledgeAbuse=false) to determine if Drive thinks your new file is a Virus (watch for the 403 abuse response).
Be aware that like all Antivirus services, Google is constantly updating it's virus definitions so a file that was not detected as a virus (false negative) may be detected as a virus at a later time and a file that was wrongly detected as a virus (false positive) may no longer be detected as a virus in the future.
Virus scanning: Google Drive scans a file for viruses before the file
is downloaded or shared. If a virus is detected, users can't share the
file with others, send the infected file via email, or convert it to a
Google Doc, Sheet, or Slide, and they'll receive a warning if they
attempt these operations. The owner can download the virus-infected
file, but only after acknowledging the risk of doing so.
Seen here
I'm pretty sure it's not an exposed part of the Drive API though. If you want to implement your own, you'll have to find a different API (maybe this?) to scan your files prior to uploading it to Drive.

Cannot Deploy Gadget-Application for Development and Testing

I want to start developing a contextual gadget for GMail apps and have been following the guide.
In the part about Installing and Testing the Gadget, it tells me to go https://code.google.com/googleapps/console/a/{Domainname} and upload the manifest file there. I have done this, the manifest file was accepted and I used the Deploy button.
I get to the page where it asks for the data permissions, click yes, and then get a Server Error. I have re-uploaded the manifest and triple-checked that the <Url> leads to a valid gadget xml. I get zero feedback about what the error could be, only that it's a Server Error and it happens every time I try. If the gadget XML is somehow invalid, I would not be able to check, as Google gives me no way to check such files for correct content.
Can anyone help, perhaps?

Permanent link to an audio file (googleDrive)

I'm developing a player for playing audio from the "cloud." Having question, if it is possible to obtain permanent link to an audio file to play without regular re-authorization (googleDrive)?
When you get the file list back from Google drive theres a field called AlternateLink this apears to have a link something like this:
https://docs.google.com/file/d/{SomehashStuff}/edit?usp=drivesdk
If I dump that link into a browser it opens the file for me. Now this will probably only work if you have access to that file and are loged into google at the time. So if you save that link my bet is that you will be able to use it later to open the file. But this will probably only work if you have access to the file and are loged into google with the browser you are using to open the link.