Skip to content

Commit

Permalink
Update drive.gs
Browse files Browse the repository at this point in the history
Fixed commit issues
  • Loading branch information
kencenerelli authored Dec 6, 2023
1 parent 5d5e72f commit e8f6ad5
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions advanced/drive.gs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function uploadFile() {
mimeType: 'image/png'
};
// Create a file in the user's Drive.
file = Drive.Files.create(file, image, {"fields": "id,size"});
file = Drive.Files.create(file, image, {'fields': 'id,size'});
console.log('ID: %s, File size (bytes): %s', file.id, file.size);
} catch (err) {
// TODO (developer) - Handle exception
Expand Down Expand Up @@ -84,11 +84,11 @@ function addAppProperty(fileId) {
}
};
// Updates a file to add an app property.
file = Drive.Files.update(file, fileId, null, {"fields": "id,appProperties"});
file = Drive.Files.update(file, fileId, null, {'fields': 'id,appProperties'});
console.log(
'ID: %s, appProperties: %s',
file.id,
JSON.stringify(file.appProperties, null, 2));
'ID: %s, appProperties: %s',
file.id,
JSON.stringify(file.appProperties, null, 2));
} catch (err) {
// TODO (developer) - Handle exception
console.log('Failed with error %s', err.message);
Expand All @@ -103,12 +103,12 @@ function addAppProperty(fileId) {
*/
function listRevisions(fileId) {
let revisions;
let pageToken = null;
const pageToken = null;
do {
try {
revisions = Drive.Revisions.list(
fileId,
{"fields": "revisions(modifiedTime,size),nextPageToken"});
fileId,
{"fields": "revisions(modifiedTime,size),nextPageToken"});

Check failure on line 111 in advanced/drive.gs

View workflow job for this annotation

GitHub Actions / lint

Strings must use singlequote

Check failure on line 111 in advanced/drive.gs

View workflow job for this annotation

GitHub Actions / lint

Strings must use singlequote
if (!revisions.revisions || revisions.revisions.length === 0) {
console.log('All revisions found.');
return;
Expand Down

0 comments on commit e8f6ad5

Please sign in to comment.