41

I have 70k images in 2k directories on my Ubuntu PC.

I want to upload them to google photo to the unlimited store (called "high quality" with reduced size).

This solution looks too complicated to me.

Is there no simple way to get this done?

My images are stored in this structure:

Images/YYYY/MM/DD-a
Images/YYYY/MM/DD-b

Example:

Images/2001/01/01-a-new-year-fireworks
Images/2001/01/01-b-skiing-with-friends
...
Images/2015/09/30

PS: I know how to upload all files of a directory by hand (using the web GUI of google photos). But this does not work recursively. This means uploading by hand is not a solution for 70k photos.

PS2: I don't want to lose my directories. Putting all images of one day into on album would mean a massive loss of information for me. Look at the above example. There are two folders for the first of January. Both contain unrelated images.

Zanna
  • 69,223
  • 56
  • 216
  • 327
guettli
  • 2,932
  • 12
  • 67
  • 115
  • 1
    Have you tried just dragging and dropping them into the online interface? Or selecting multiple images during the upload selection process? – Daniel Sep 21 '15 at 18:27
  • 1
    @Daniel I have 70000 images in about 7000 directories. Please explain how I can solve my problem with copy and paste. Yes, I now how I can upload all files in one directory. That's easy. But there are too many directories. I don't want to upload each directory by hand! – guettli Sep 22 '15 at 08:01
  • Use shotwell.... Gimme a minute to write you an answer – blade19899 Sep 22 '15 at 08:06
  • The 7000 directories should be inside another directory right? Where else is it? – daltonfury42 Sep 30 '15 at 05:30
  • @daltonfury42 I updated the question. You can see the directory structure there. What do you mean with "Where else is it?" – guettli Sep 30 '15 at 05:35
  • There should be a common parent folder within which all these photos/folders are stored. Why can't you just drag and drop this folder? I do this all the time, though it's always less than 1k pics. – daltonfury42 Sep 30 '15 at 05:37
  • @daltonfury42 Where should I start the "drag" and where should I end the "drop"? – guettli Sep 30 '15 at 05:40
  • If you have such a folder, which you definitely will have, I can write a answer with screenshots... – daltonfury42 Sep 30 '15 at 05:42

5 Answers5

31

The answer to this question seems very trivial. All you have to do is open your file explorer (Nautilus) and open photos.google.com in your browser, and then drag the entire directory structure to the web page as given in the screen shot!

screenshot

Just drag and drop the "Images" folder. It is not a problem if the folder contains other files. Google will detect and upload only photos and videos. At the end of the upload, it will show a list of files which were not uploaded.

Flimm
  • 40,306
  • 22
  • 94
  • 154
daltonfury42
  • 5,459
  • 5
  • 31
  • 62
  • I tried it with firefox. Nothing happens. I tried it with chrome: it uses 100% cpu and a pop-up comes up "chrome does not react any more" (translated from german to english). What do you mean with "All these folders will have to come under one sub-folder"?. I dragged my "Images" folder. It contains theses dirs: 2001, 2002, .., 2015. These directories each contain 01..12 (per month). – guettli Sep 30 '15 at 06:07
  • 1
    Even if it is freezing, maybe it's still uploading? Can you check this? You can use `bmon` (`apt-get install bmon`) to get the upload rate(speed). That being said, I meant "All these folders will have to come under one folder". not sub-folder. sorry. – daltonfury42 Sep 30 '15 at 06:14
  • If I use one year (I choose 2001 which is very small compared to the last years) it works with chrome, but not with firefox. Still one problem remains: My structure gets lost. For some days I have two directories: Example: 2015/01/01a-nigh-firework 2015/01/01-b-skiing-with-familiy. I would like to have an album per directory. – guettli Sep 30 '15 at 06:21
  • So you want to create 2k albums? If not, ie the amount of albums you want to create are small, upload the folder you want to be as a single album and then you will be asked if you want to create an album with the photos you just uploaded. – daltonfury42 Sep 30 '15 at 06:25
  • 2
    Yes, I want to create 2k albums. I could rename them an my pc from `YYYY/MM/DD-x` to `YYYY/MM/YYYY-MM-DD-x`. If there is a way to name the album like the folder, then the ordering would be perfect. AFAIK albums can't be nested like directories. If they could, then I would choose the layout I already have. – guettli Sep 30 '15 at 06:29
  • It is possible if an API like [this](https://developers.google.com/picasa-web/docs/1.0/developers_guide_python?hl=en) exists for Google Photos or if this API can work with Google Photos as well. Then you could create a python script to do the job! I have an exam tomorrow and I am not a pro at python myself. Or I could have given it a try. – daltonfury42 Sep 30 '15 at 06:42
  • 1
    I guess there are APIs for google photo. AFAIK picasa does not help. But I am wearing my ubuntu user glasses. With these glasses on I can't to programming. – guettli Sep 30 '15 at 07:59
  • Let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/29707/discussion-between-daltonfury42-and-guettli). – daltonfury42 Sep 30 '15 at 10:54
  • I do remember reading there was a girl working in Google who decided (yeah, it was her job) there will be *no* Picasa app for Linux because "we already have better solutions for backup and version control" (loose quote) and for the users who still want to sync photos that way she made an impromptu script in Go language in 15 minutes. If anyone finds this article or script, please, post a URL in a comment because I can't seem to find it again. :( – cprn Oct 03 '16 at 23:52
  • @cprn this is the tool you are referring to: https://github.com/odeke-em/drive#installation – Maks Oct 23 '17 at 01:11
  • @Maks No, I don't think so. Tool you linked to didn't exist back then yet. Also, it's written by a guy - I'm pretty sure it was some Google girl who posted a way smaller tool on her blog. It was just comparing photos with dates and syncing. No fancy stuff. Thanks for the link, though. – cprn Oct 23 '17 at 11:45
  • @cprn yes it is. Please carefully read the second paragraph of the Readme, it clearly outlines the history of the project, including who the original author was. – Maks Oct 23 '17 at 20:26
  • @Maks My bad, you're right. It was Rakyll's. No photos then... My memory deceived me once again. :( – cprn Oct 26 '17 at 08:19
20

Uploading with Shotwell

Use Picasa plugin

It sounds weird since Picasa seems obsolete and a different service, but it looks like Google has joined this service with Photos so you can use it to upload photos there as a new collection. To enable this plugin:

  1. Choose EditPreferences
  2. Click on the Plugins tab
  3. Make sure Picasa Web Albums is enabled and close the dialog

Import the files

  1. Select the root folder of all of the images, lets Shotwell import them all
  2. Next, selects them all. For this you can click one and then press Ctrl+A
  3. Choose FilePublish or press the Publish toolbar button or use Ctrl+P
  4. You will see a dialog that lets you select a publishing service. You will then need to log in or create an account.

Screenshot:

Shotwell screenshoot

Create a new Album or choose an existing one, make sure the List album in public gallery checkbox is disabled and preferably set Original Size as the photo size preset. Then push Publish and done! You can see the pictures on Google Photos


Excerpt from:

blade19899
  • 26,496
  • 21
  • 113
  • 177
  • Picasa and google-photos seem to be two different things. I never used one of them, but read: https://sites.google.com/site/picasaresources/Home/Picasa-FAQ/general/comparison-different-products. Google-Photo has unlimited storage. If I do it like you show it ... I guess the images won't be in google-photo. Or am I wrong? – guettli Sep 23 '15 at 07:10
  • @guettli I have never used any of those services, so can't really tell you. I use mega.nz as my online DATA storage. – blade19899 Sep 23 '15 at 13:02
  • @guettli btw, Google Photo service has limited storage, which nowadays is less than 15Gb in a normal account. – Lucio Sep 27 '15 at 02:37
  • 2
    Hey @blade19899 your method worked great! It uploads all the photos and instantly you have them on https://photos.google.com :) – Lucio Sep 27 '15 at 02:54
  • @Lucio from https://support.google.com/photos/answer/6220791?hl=en "Unlimited free storage" On the other hand. Does it mater for this question whether I want to upload 15G or 150G? – guettli Sep 27 '15 at 05:58
  • @blade19899: looks so cool already that I'm not even going to answer and start using your solution! **;-)** – Fabby Sep 29 '15 at 17:54
  • Is it possible that Google Photos export is no longer possible to handle with Picasa exporting plugin? I'm getting "501 not implemented" error when I press Publish. – Kepi Feb 23 '17 at 01:50
  • 4
    I'm getting stuck at the step where the dialog says: "Please copy this code, switch to your application, and paste it there" – Flimm Jun 23 '18 at 17:59
  • This used to work, but it no longer does. Now Google returns a "400, Bad request" error. – benbotto Jul 28 '18 at 01:45
3

Go to Google Photos Web

Select Upload

In the UPLOAD FROM dialog box select Computer

In File Upload Open the top level directory that contains the photos and videos - see note 3 below

Now for the interesting part

Select the search icon (Ensure you are searching at the right level, it is written in small letters just under the File Upload header

And search for . that's space followed by full stop (or dot) to match all your images and videos

Note: this works because the space matches everything similar to how many people would expect * to work and the dot will match the dot in the filename in for example my_image.jpg

Next select all the files, for example click on the first one and then use Ctrl A, or use the mouse or whatever

Finally select Open to upload all the files

A few points just to mention...

  1. I'm using Ubuntu 18.04
  2. This worked for me in both Chrome and Firefox
  3. I wasn't quite brave enough to go to the very top level folder, I've been uploading one year of photos at a time which in one case was almost 5,000 photos, although in some cases there were three or four levels of nested directories.
sweeneydavidj
  • 131
  • 1
  • 5
  • After selecting more than 10,000 photos this way, the "Upload" button was grayed out. So there appears to be some upper limit for the amount of photos that can be selected this way. – Mark Stosberg Aug 08 '22 at 12:45
1

By coincidence I found a way to upload a big db to Google Photos. Use fe Overgrive to sync the specific folder to Google Drive. You temporarily might have to pay for extra space in GD. Then turn on the option to show the pictures in GP from the GD (if you hadn't already). When all the pictures show in GP you can remove the folder from your GD and the pictures will still show in GP (though in my case not original quality, but I didn't want that anyway). And cancel the extra space in the cloud.

PS. For using a network folder. Maybe it is possible to create a local folder of the network in the GD folder of Overgrive. But saw some worries on this topic. Didn't try it yet.

PS2. Overgrive is/was planning to create a solution for syncing pictures to GP. Don't know the status of that to be clear.

PS3. After uploading the database I expect to use auto upload from the devices themselves. But if the database has evolved, the new folders can maybe also be uploaded the same way as mentioned in the beginning.

PS4. Also noticed Insync software which should also work in Ubuntu. Haven't tried that one yet.

HAK
  • 19
  • 2
0

EDIT

Unfortunately this doesn't work. I don't know whether it never worked and I just missed to notice or it stopped working at some point. Currently the following solution will only upload files to Google Drive and these won't be available in Google Photos and will take up your space (unlike files from Google Photos that have 0kB size when High quality setting is on). I'm not deleting the answer because maybe someone will figure this out and improve it.

Original answer

Just another way of doing things:

  1. set Google Photos (in Drive settings) to appear in Google Drive
  2. mount Google Drive (e.g. add your Google account to GNOME Online Accounts in system settings and open google-drive://[email protected]/Google Photos in your file manager)
  3. copy photos structured by YYYY > MM > DD > file, e.g.:
+ 2016
|
 `+ 08
  |
  |`+ 20
  | |
  | |`- myawesomepic.jpg
  |  `- DSC20160820066.PNG
  |
   `+ 23
    |
     `- vid016.mp4
  1. you can download and / or remove photos in the same way
cprn
  • 1,159
  • 2
  • 12
  • 22
  • AFAIK only Google Photos has unlimited space. I have 400GBytes images. I guess this solution does not work, since I don't have that much space in Google Drive. – guettli Aug 24 '16 at 20:21
  • 1
    I was sure this sends images to Photos but I just checked and files uploaded this way are only available on Drive and don't appear in Photos. :( And like you said, unlike files uploaded via Photos, these take up space. Shame... I'll edit my answer. – cprn Aug 25 '16 at 12:48