Automatic Image Uploading

Hi Experts,
                 There is a repository of images on a windows PC containing 1000s of images. Some of these images, maybe 100 change everyday, which is an automatic process with no intervention.

The repository of images needs to be reflected to my server which runs PHP, SQL etc..

What I need to be able to do is to send the changes to my server.  In other words I would like to be able to send the timestamp of the local image and compare it with the timestamp of the remote version of the image, if a change has occured I would then overwrite the server version with the local version.

I dont mind opening a webpage to instigate the image updates, but what I cannot do is search for the changed images manually as that would take a very long time.

Is this possible, maybe with HTML5 or even PHP/FTP ?

Many Thanks, ChrisColeman.
Chris ColemanAsked:
Who is Participating?
 
Olaf DoschkeConnect With a Mentor Software DeveloperCommented:
In theory, though perhaps Irfanview or Gimps script fu are better options, you could even install PHP client side and use your GD processing.

Bye, Olaf.
0
 
Olaf DoschkeSoftware DeveloperCommented:
Beyond Compare can do that, compare and sync source/target folder, even in case the target folder is a ftp url.

Bye, Olaf.
0
 
Chris ColemanAuthor Commented:
Olaf, Thanks and looks good - Chris.
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Ray PaseurCommented:
I think Beyond Compare is probably the best solution, and it's so inexpensive that it doesn't make sense to write custom software.  

From a theoretical perspective, a version control system like Git might make sense.  If I were going to design something custom, I'd look at using md5() strings for each of the files, instead of dates.  That way, only files that actually had changed content would be flagged.  Restoring a backup might change the file's date/time signature, or the server might be in a different timezone, so a message digest would seem to be a more reliable way to know what changed.
0
 
Olaf DoschkeSoftware DeveloperCommented:
File times typically are in UTC and just translated to system/locale time, but you can compare on raw filetime, where server timezones make no difference.

Beyond Compare offers comparison by content, too, eg by it's crc or binary (full) comparison, though thats obviously not saving the upload or download time.

Few ftp server support xmd5, so Beyond Compare still mainly compares on file meta data you can receive via FTP listing commands. In case you only touch files with a self developed php tool you can use MD5, of course, you can even maintain a database with a record maintaining all meta data you want or need (eg log last upload/download), but once you do manual uploads/deletes your database info is outdated. Beyond Compare rather concentrates on only comparing the files themselves without any support database. Both ways have their pros and cons.

What's perhaps a killer feature of Beyond Compare for you is that it may find similar pictures, even if you have them in different formats and sizes.

Bye, Olaf.
0
 
Chris ColemanAuthor Commented:
- I'm having a problem with 'Beyond Compare' because I do not wish to keep source images on the server, basically they should be deleted following reduction by PHP/GD - IE. Some of them are rather large.

I'm now thinking of something like --

A) An automated process on windows runs periodically and creates a list of files, directories and timestamps.
B) The automatic process also FTPs the list to my server.
C) On the server a DB contains vital statistics  of images currently active on the server, so I can use the uploaded list to prune deleted images

D) The problem remains to upload new and updated images. What I'm thing of is using FTP again to download a list of required new images from the server (ie. the list was prepared in C. above).

E) Once I have the downloaded list I can I can start an automatic FTP process to upload the list.
F) The newly uploaded images are then processed by PHP/GD (minimised, thumbnailed and source deleted) whenever the website is opened, by anyone.

I know its horribly convoluted - but whaat the heck ?

Any comments .. Chris.
0
 
Olaf DoschkeSoftware DeveloperCommented:
>I do not wish to keep source images on the server
I'm a bit confused. The goal is to upload new or changed images, right?

>processed by PHP/GD (minimised, thumbnailed and source deleted)
Ah, you upload large/original scale images and shrink them serverside. Why? Because you can do it with PHP/GD? Isn't it much simpler and bandwidth friendlier to first resize, then upload?

There are so many image processing programs also on Windows, capable to batch process directories and shrink/web optimise files, why insist on doing that server side with GD?

Once you only have the web size images uploaded, no need to keep the originals merely for syncing not detecting them missing.

Bye, Olaf.
0
 
Chris ColemanAuthor Commented:
Actually I didn't even consider that option, probably because i was converting from a website that kep't the source images, but now its so big tht I cannot keep the source images on the server.

Actually that will save a considerable amount bandwidth and processing time too.

I have just looked at irfanview batch processing and I belive that could be what need.

Many Thanks Again - Chris.
0
 
Chris ColemanAuthor Commented:
Yes I did consider PHP client side because I already have that, but the client I'm working for does not and it would be a problem for him.

Actually I'm developing this for a disabled person who has diffficulty uploading photos therefore I need to make it seamless as possible.

Hopefully all he needs to do now (or when its complete) is connect up his camera ..

Gimps script fu seems pretty good too.

Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.