google-photos-uploader


This extension just provides google-photos-uploader: Upload image and replace
command.
The command will do all the step shown below:
- extract img path from your markdown text
- upload to Google Photos
- replace img path to Google Photos published url
Keep in mind that this plugin will publish all images the target markdown file referencing to all over the world.

How to use
Run command
Open command palet(Ctrl
+Shift
+P
), find google-photos-uploader: Upload image and replace
command and execute.

(OAuth)
This plugin sometimes request you OAuth2 Authentication.
In this case, default browser will be started.
- Select Google acount and login

- App verification is now in progress. Until I receive Google's response, please ignore this warning to continue when you think this plugin is reliable.

- Authorize these parmissions.


- Authorize these parmissions again!(I don't know why authorize phase are duplicated)

- Sucess! Go back to vscode.

Select Album
Because of Google Photos API limitation, albums you can add photos must be created by this plugin.
So, you have 3 choices to upload images.
- I don't want to add photos to albums: not tested
- create a new album
- select album already created by this plugin

When you chose create a new album
, you need to specify the new album name.

Please wait for seconds
On this phase, this plugin executes below:
- extract image path
- upload image (depend on the total image size and your traffic speed, showing progress info)
- register images to the album
- get published image URL
- replace image path to the URL



Known Issue
Because of pulldown-cmark-to-cmark limitation, all code block will be replaced like below:
before
:
```typescript
console.log("arikitari na sekai");
```
after
:
````typescript
console.log("arikitari na sekai");
````
Almost all cases, that is no problem because HTML converted result will be equal.
However, in some cases, the replaced result will be broken.
before
:
`````markdown
````markdown
```typescript
console.log("arikitari na sekai");
```
````
`````
after
:
````markdown
````markdown
```typescript
console.log("arikitari na sekai");
```
````
````