Google Drive: Automatically convert files on upload? - import

Is it possible to get Google Drive to automatically convert uploaded documents to the native format?
I know it works with manual upload (i.e. Google Drive can auto-convert files you upload via the website), but I want to avoid having to upload every file by hand.
I'd prefer to use the API, or better yet, dump the files in my ~/Google Drive folder.

Using the API, you can pass the convert=true parameter to files.insert. The uploaded file will attempt to be converted to a native Google Docs format.

Sure, see this answer. Note you can upload a text file or a csv file and set its content type to google doc or google sheets respectively, and google will attempt to convert it. I have tested this for text -> doc and it works. You will need to set the const contentType at the start of the code to one of the supported google mimetypes.

Related

Can I upload already-encoded content to azure media services, instead of uploading a video and then encoding it? How?

I want to encode locally and upload to avoid spending money in encoding.
Is this allowed? I did not find any documentation on it.
When I simply uploaded a file to the storage, the media services account said it could not play it without the ISM file. I had to encode (was it re-encode? it was an mp4) the file I had uploaded - I want to avoid that.
Yes, absolutely allowed and encouraged for customers. Especially ones that have custom encoding requirements that we may not support.
You can upload an .ism file that you create along with your encoded files. It's a simple SMIL 2.0 format XML file that points to the source files used.
It's a bit hard to find searching the docs, but there is a section outlining the workflow here - https://learn.microsoft.com/en-us/azure/media-services/latest/encode-dynamic-packaging-concept#on-demand-streaming-workflow
There is also a .NET Sample showing how to do it here:
https://github.com/Azure-Samples/media-services-v3-dotnet/tree/main/Streaming/StreamExistingMp4
You can see the code line at 111 that shows how to generate the .ism file -
// Generate the Server manifest for streaming .ism file.
// This file is a simple SMIL 2.0 file format schema that includes references to the uploaded MP4 files in the XML.
var manifestsList = await AssetUtils.CreateServerManifestsAsync(client, config.ResourceGroup, config.AccountName, inputAsset, locator);

How to retrieve some information without using file

I'm searching a way to retrieve data (csv format) from something which is not a file, let me explain.
In the company i'm in actually they quit Fileserver to Google Drive - So i'm actually trying to read information from a google spreadsheet but it didn't work nicely so far.
Any idea how to do this ? Any other idea on a way to centralise datas (CSV format) which is neither fileserver or using GDrive ?
The data source should be easily modified (no database..)
Thanks.

how to compress file in sapui5 before uploading on server in instant upload?

I want to compress a file before uploading it on server in sapui5 (image(png/jpeg/jpg)/pdf/). I want to upload a large files but i want to compress that file before uploading. Please suggest me solution ?
I think you will not be able to do it with instant upload. Instead, you should obtain the file from the change event of the file uploader (check out the change event, it has a files parameter).
You can then use that file object together with the zip.js library to create an in-memory zip and save it into e.g. a Blob. Afterwards you simply send the blob into a POST request (e.g. look at How can javascript upload a blob?). Maybe you should also provide some file-uploading specific headers (like the Slug).

Parsing Contents of Dropbox File in JavaScript Web App

Is it possible using the Dropbox JS SDK to create a JavaScript web application that is able to parse the files in a user's Dropbox? In my use case, the user has some JSON files that I would like to parse and preview in the browser. Will the filesDownload(arg) method allow for this type of application, or is it only able to download the file to the user's machine?
The download methods, such as filesDownload and sharingGetSharedLinkFile return the file content directly as a Blob, as seen in the download example.
As long as you can use a Blob to do what you want, this should be possible.

Is it possible to download a file that uploaded via filepicker in chucks?

Is it possible to download a file that I uploaded via filepicker, in chucks? I work on a platform that doesn't allow me to download files overs a certain size programmatically, (httprequest) so I have a need to retrieve the file in chucks and reassemble them.
No we don't currently provide this functionality.