Google Docs has a quotaBytesUsed method but it doesn't account for native files. Is there any other attribute that references the size of an entry?
Google Docs native files don't use your storage quota so their size is not returned
Related
Is it possible to get alternative image sizes using instagram basic display api? So far I haven't found any possibilities on api doc, but when I inspected instagram web app html source I found srcset attribute which contains several images for different versions, so they exist. Is it possible to get it using the api somehow?
Unfortunately it is not possible with the new API :((((((
I have images with important file metadata (e.g. provenance and processing history) stored locally or in Azure blob storage.
I would like to import (POST) these to the Azure Custom Vision environment (via the API or GUI) (see e.g. https://southcentralus.dev.cognitive.microsoft.com/docs/services/Custom_Vision_Training_3.0) for training while (i) retaining those image metadata and (ii) being able to retrieve them via (a) the Custom Vision API and (b) the Custom Vision GUI.
An example use case would be to purge images of a certain provenance from the Custom Vision store because of a GDPR-related customer request [Aside: I appreciate that Azure Cognitive Services can anyway use the data for improving their models etc.].
As far as I can tell the only way to reference an image POSTed to Custom Vision is via its UUID. Is there any other way to reference metadata stored with that image or:
Would that constitute a feature request?
Could the image metadata be stored inside the image (e.g. JPEG EXIF) (assuming it is possible to retrieve the image itself from the Custom Vision "environment", which it may not be)?
Otherwise, is the only solution to store the returned Custom Vision image UUID in a database elsewhere alongside the required metadata?
NB In the above, by metadata I do not mean tags/labels in the image model-side sense, but rather data-side file metadata.
[Note that Azure Cognitive Services is using stackoverflow for Q&A, so this question is I believe appropriate for stackoverflow.]
Thanks as ever!
I am not part of Microsoft, so it is only my opinion based on my usage of Custom Vision.
I understand your use-case, especially regarding GDPR as you mentioned, but currently adding metadata is not a feature, whether through the API or the GUI.
To answer your questions:
Would that constitute a feature request?
Definitely. You can create an item on UserVoice for this feature (but 1st check if there is not another related existing item): https://cognitive.uservoice.com/forums/598141-custom-vision-service
Could the image metadata be stored inside the image (e.g. JPEG EXIF)
(assuming it is possible to retrieve the image itself from the Custom
Vision "environment", which it may not be)?
You can get the images your previously posted using GetImagesByIds method from the API for example (or GetTaggedImages / GetUntaggedImages). Remember that the images you post are treated: thumbnail images, resized images are generated based on what you posted. These methods provides the links to the images.
I made a quick try by:
- Uploading an image to CustomVision and adding a tag
- Getting its id
- Getting the image through the API
Good news: on the image downloaded with the "originalImageUri" link, I still have some EXIF available (just needed to rename the file as ".jpg" after download):
Otherwise, is the only solution to store the returned Custom Vision
image UUID in a database elsewhere alongside the required metadata?
Right now it is clearly the best solution in my opinion
How to read data from Google Drive, such as file name, etc.?
I want to get the file name, the link and the picture of the first page of a book (if it's possible) in Google Drive using Kotlin.
Google Drive has a REST API, check the documentation here:
https://developers.google.com/drive/api/v3/about-sdk
Specifically, there is a service to search files:
https://developers.google.com/drive/api/v3/search-parameters
In Android you can consume REST API using Retrofit:
https://square.github.io/retrofit/
It works perfectly with Kotlin.
I'm using GCS to store my user's images in our react-native app. I need a small version of images so I can implement progressive loading. Is there any way to get a resized image from the GCS url or using any other method?
I'd like to avoid having multiple instances of the same image in our storage.
I know you can do something like:
http://lh3.googleusercontent.com/93uhV8K2yHkRuD63KJxlTi7SxjHS8my2emuHmGLZxEmX99_XAjTN3c_2zmKVb3XQ5d8FEkwtgbGjyYpaDQg=s250
with google photos, where the =sXX at the end (xx being any number between 0 and ~2500) is the size that returned image will be.
is it possible to do something similar using GCS?
this is what a url to an image looks like with respect to our app:
https://storage.googleapis.com/appName.appspot.com/1513912717946-Image_1513912675892.jpg
You need App Engine to generate those URLs, and this is only available in the standard environment.
Relevant docs are: Python, Java, PHP, and Go.
The API allows you to generate (and delete) those URLs. The generated URLs support the =sXX parameter. XX is an integer from 0–2560 representing the length, in pixels, of the image's longest side. It also supports cropping the image into a square with =sXX-c.
Elaborating: App Engine is Google's PaaS offering. You can read more about the standard and flexible environments here.
or, Can i create/modify google docs by 3rd application?
Google does not share info on their native, proprietary format--possibly called "kix" according to this StackExchange answer.
You CAN programmatically create, modify and destroy Google Drive document files in 3rd party apps (or build your own) by manipulating representations of those files exposed by various Google APIs and scripting services. It took a bit of truffle-hunting through the online documentation, but I did find a description of the structure of a Google Doc here: Extending Google Docs.
Again, this is a description of a representation of the file, not the file itself.