0

Possible Duplicate:
version to folder using java programming

In my Java web application project,I need to add versioning to one of my Images folder,if user done any modification to image and updated then it should maintain new version on recently updated image(similar as svn), to do this i decided to integrate svnkit in my project please tell me how to do this programming or implementation.

Community
  • 1
  • 1
Rubia
  • 445
  • 2
  • 6
  • 17
  • 1
    this is the same question as: http://stackoverflow.com/questions/8321507/version-to-folder-using-java-programming – oers Nov 30 '11 at 05:54

1 Answers1

0

This is similar to a question posted earlier... Anyway, SVN is not a very good choice in my humble opinion as it is suppose to be used with text-based files. Why do you want to call a 'diff' on binary files? ...and why? I would recommend one of the following:

  1. Store the images as blobs in a database, that included an MD5 sum of the file, date modified, etc.

  2. If you don't like blobs, store the images in a folder with a time extension (i.e myimage.jpg.20111112_092311_1) and store the md5 sum of the image somewhere else so that you know it got modified.

I have worked with SVN in java apps before. I do not find SVN particularly trustworthy. I would recommend you think carefully before going that route. Your own implementation may actually be better here.

(For md5 sums, search for MessageDigest)

Jaco Van Niekerk
  • 4,180
  • 2
  • 21
  • 48