diff --git a/pkg/importer/picasa/picasa.go b/pkg/importer/picasa/picasa.go index afcbbd99c..a1d62201c 100644 --- a/pkg/importer/picasa/picasa.go +++ b/pkg/importer/picasa/picasa.go @@ -21,6 +21,7 @@ import ( "fmt" "log" "net/http" + "net/url" "path/filepath" "strings" @@ -89,12 +90,19 @@ func newImporter() *imp { } func (im imp) AccountSetupHTML(host *importer.Host) string { - base := host.ImporterBaseURL() + "picasa" + // Picasa doens't allow a path in the origin. Remove it. + origin := host.ImporterBaseURL() + if u, err := url.Parse(origin); err == nil { + u.Path = "" + origin = u.String() + } + + callback := host.ImporterBaseURL() + "picasa/callback" return fmt.Sprintf(`
Visit https://console.developers.google.com/ -and click "CREATE PROJECT".
-Then under "APIs & auth" click on "Credentials", then "CREATE NEW CLIENT ID".
+and click "Create Project". +Then under "APIs & Auth" in the left sidebar, click on "Credentials", then click the button "Create new Client ID".
Use the following settings:
Click "Create Client ID". Copy the "Client ID" and "Client Secret" into the boxes above.
-`, base, base+"/callback") +`, origin, callback) } // A run is our state for a given run of the importer.