To create a file that contains no metadata or content, use the
files.create method with no parameters.
The file is given a
name of "Untitled,"
Drive automatically generates thumbnails for many common file types. For file
types that Drive can't render, you can provide a thumbnail image generated by
your application. During file creation or update,
upload a thumbnail by setting the
contentHints.thumbnail fields on the
File resource. Specifically,
thumbnail.imageto the URL-safe Base64-encoded image (see RFC 4648 section 5)
thumbnail.mimeTypeto the appropriate type for the image format.
If Drive can generate a thumbnail from the file, then it uses the generated one and ignores any you may have uploaded. If it can't generate a thumbnail, it uses the one you provide.
Thumbnails should adhere to these rules:
- Thumbnails may be uploaded in PNG, GIF, or JPG formats.
- The recommended width is 1600px.
- The maximum file size for a thumbnail is 2MB.
- The minimum width for thumbnails is 220px.
- Thumbnails should be updated by your application with each save.
For more information, see the Files reference.
Here are a few next steps you might try: