Windows Client for Gallery 3
rWatcher
Joined: 2005-09-06
Posts: 722 |
Posted: Thu, 2010-11-04 18:36 |
Here is the initial release of my windows-based REST client for Gallery 3. Currently, this client program will allow users to log into their galleries, browse through albums and thumbnails, create new albums, and upload new photos. I've also added optional support for the itemchecksum module, which will allow this program to generate and compare the contents of a local folder and a gallery album (sub-folders / sub-albums are ignored) using sha-1 checksums, which could help to locate modified/damaged/missing photos. This program should run under Windows XP and up, and requires Microsoft's .Net Framework 3.5 to be installed on the computer (which can be downloaded from http://msdn.microsoft.com/en-us/netframework/cc378097.aspx ). This program uses REST, so the "REST API Module" (and optionally the itemchecksum module) will need to be installed and active on the gallery server in order for it to function. I wasn't sure if Windows software should go into gallery3-contrib or not, so instead I've set up a seperate repository for the source code at: See the documentation link for more information. --- |
|
Posts: 130
Hi,
When I try to use it I get these two errors:
http://screencast.com/t/pgZaBWjMxZ
http://screencast.com/t/IlaP8FwcrA7H
-Marc
Posts: 722
It looks like it's getting something un-expected when it accesses http://www.example.com/gallery3/index.php/rest/item/1 (where example.com/gallery3/index.php is the address of you're gallery). If you're not logged in, and you try and access that address from a web browser, what do you see?
Also, are you using the current stable release of Gallery 3, or the experimental version (I haven't tested this against the experimental version yet)?
Posts: 722
You didn't happen to set the view permission on the root album to deny did you? (this would mean you'd get a password prompt whenever going to "http://www.example.com/gallery3/index.php" if you weren't logged in) Because I can get the second error message if I do that. It appears to be caused by a bug that was fixed after version 3.0 was released ( http://gallery.menalto.com/node/98835 ). The first error I get is different though, so I'm not sure if that's the problem or not.
Posts: 44
I'm sure you already know this, but if someones using a url rewrite rule and you try to access "http://www.example.com/gallery3/index.php/rest/item/1" you'll probably get that same error.
Posts: 722
Hmm... Okay, I'll have to test that...
It seems if you're using url rewrite, and you provide the correct URL (ex: http://www.example.com/gallery3/), it works fine. If you provide a url with index.php on the end, it generates a 403 Forbidden error on login, and doesn't get past the login screen (this is the same thing that happens if you type in the wrong password). So that part appears to work correctly
Posts: 5
I tested the client on my fresh installed and running gallery3. After the login a get the following error:
---------------------------
Error
---------------------------
Der Remoteserver hat einen Fehler zurückgegeben: (417) Expectation failed.
---------------------------
OK
---------------------------
The main window is empty and no albums or pictures are shown.
Posts: 722
That's weird, I've never seen a 417 error before. Are you using the current (3.0) release, or the latest experimental code from github?
Also, did you make any changes from the default configuration (such as requiring all users to log in to view the root album, turning on mod_rewrite, adding a .html extension to the URLS, etc).
Posts: 9
Awesome client, thanks a lot - works fine.
Posts: 722
I'm glad you like it. Also, I'm glad it works fine, I was starting to wonder if I was the only one it worked properly for
Posts: 5
I uses the attached file of the first post in this thread.
Hmm, my root album can be seen from any user without login. I tested a bit with some parts in the .htacces, but I always get the 417 error.
Is there any documentation about the requirements for the client?
Posts: 2258
Thanks rWatcher! I added a link to this to:
http://codex.gallery2.org/Category:Gallery_3:Other_Clients
PM me your shipping info and t-shirt size if you'd like a Gallery t-shirt!
____
http://ckdake.com/ - If you found my help useful, please consider donating to Gallery.
Posts: 28
rWatcher and ckdake
I took rWatcher's code and i've converted it to C#. I'm in the process of separating more client from backend. Basically I plan on separating presentation from the business and data layer.
I'm looking to build some new applications with this. I plan on creating a potential WPF application that will work in Windows 7 a little nicer too.
Show I check in a whole new branch once I get closer??
Thanx
Posts: 8
Savo
Did you ever finish this & publish it anywhere?
I'd like to use the library for something- I'd be happy to contribute patches if I encounter any bugs.
Also, what license does the source fall under? I didn't see anything in the github repo to indicate GPL, Apache, etc.
Posts: 722
Rest Client Version 1.1.0
This version has been tested against Gallery 3.0.1.
Posts: 28
Good job rWatcher.
I plan on releaseing something that uses rest very shortly. @callingshotgun stay tuned.... other jobs and life in general keeps me from working on what I'd like to do more work on.
Posts: 1
Hello,
good idea with the new windows client. Thanks.
But I need some additional feature. Is it possible to implement and how difficult is it? Maybe I have the chance to involve my self. Did you know a other windows client which work together with gallery3?
+ I have an .htaccess on my gallery -> client doesn't work with that :/
+ I need a client based picture resizing
+ I must disable the auto load of picture preview on the client site
The reason for all that feature are that I travel a lot and the Internet connection is not every where good :/
I hope you can help me
Thanks
Peter
Posts: 722
REST Client Version 1.2.0:
- Added Logout button / Closing the album window auto-logs out instead of quiting.
- Added "Recheck Errors" button to Compare Files window.
- Fixed window re-size issue with Compare Files window.
- Updated icon file.
- Updated Copyright to 2012.
- Other minor tweaks throughout the program.
Download
Posts: 83
i also had the problem with .htaccess secured gallery.... http://username:password@www.xyz.ch.... dosent work....
Posts: 27
How do i hide the tab from users who are not logged in?
Posts: 72
After logging in I get the below error:
Not sure where the C:\Users\Eric\Documents\SharpDevelop Projects\Gallery-3-REST-Client\Gallery 3 REST Client\FormAlbumBrowser.vb is coming from, as that folder/user does not even exist on my computer.
I am running Windows 7 64bit, I checked and .net 3.5.1 is installed. I do not have the itemchecksum module installed in Gallery, but then all the info I see says it is optional. I am running Gallery v3.0.3.
Posts: 72
Apparently itemchecksum is required, and not optional as stated.
Once I installed and enabled the itemcheckcum module, this client started working.
Thanks for the great work on this!
Posts: 183
Hey rWatcher,
Thanks for the work on the nice client! If I may be so bold as to ask, though, I do have one feature request...
Can you make the local directory comparison feature include subdirectories? To simplify coding, at least in my particular case, it'd be perfectly fine if you require the directory names on the local and server copy to be identical...
Take care,
Shad
Posts: 1
Hi rWatcher,
I've been using your client until a few days ago and it had been working fine. After the latest Windows update last week, I think something in the update has broken your client. I'm getting the message that root element is missing, and if I click continue, after getting the login page and filling in my details and connecting, it gets the same error of 'root element is missing' and if I click continue, it just stays on the login screen.
The error details are below, hope you can help. Thanks.
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.Xml.XmlException: Root element is missing.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res)
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlTextReader.Read()
at System.Xml.XmlReader.MoveToContent()
at System.Data.DataSet.ReadXml(XmlReader reader, Boolean denyResolving)
at System.Data.DataSet.ReadXml(String fileName)
at Gallery_3_REST_Client.FormLogin.FormLoginLoad(Object sender, EventArgs e) in C:\Users\Eric\Documents\SharpDevelop Projects\Gallery-3-REST-Client\Gallery 3 REST Client\FormLogin.vb:line 131
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5456 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Gallery Client
Assembly Version: 1.2.0.0
Win32 Version: 1.2.0
CodeBase: file:///C:/Users/Tuen/Desktop/Downloads/Gallery-3-REST-Client-1.2.0-binary/Release/Gallery%20Client.exe
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5460 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5456 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5462 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
Posts: 722
That loads your saved settings (Gallery URL, REST Key, etc) from the config.xml file. Is it possible that this file became corrupt? Here's what it should look like (you can open it in notepad or any other text editor):
http://github.com/rWatcher/Gallery-3-REST-Client/blob/master/Gallery%203%20REST%20Client/config.xml
Edit:
Forgot to mention, on Windows 7, the default location for the config.xml file would be in your AppData\Roaming\Gallery3Client folder. If I'm reading your error log right, that would put it at:
c:\Users\Tuen\AppData\Roaming\Gallery3Client\config.xml
Posts: 3
Hello
Thank you very much. :D
Cool source files.
But when I use the Compare To Local Folder it writes: "One file did not match and has been bolded."
Installed: ItemChecksum module.
Thank you in advance for your help.
Posts: 722
If you scroll through the list of files, the bolded file would be the one that didn't match. This usually happens if:
1) A file is in the local folder, but not in Gallery.
2) A file is in Gallery, but not in the local folder.
3) One of the files has been modified in some way -- could be a sign of a damaged or corrupt image file, or just a sign that you rotated a photo after uploading it.
Posts: 3
Ohh I see.
Now I understand. :D
Thank you very very much boss. :D
Edit:
1.) How do I download/save a picture of the program? :P ----> Mission Completed(Now I know). :D
2.) Registration will be part of? :D
Posts: 722
REST doesn't support registering new users, you'll have to have users set up new accounts through your Gallery web site.
Posts: 3
Ok. Tank you Boss :-D
Posts: 4
Having found this thread, I thought "oh thank god it's been created after all", unfortunately excitement was cut short:
Trying the latest 1.2.0 zip and receiving the following error: The remote server returned an error (404) Not Found
Details says:
at System.Net.HttpWebRequest.GetResponse()
at GalleryLib.Gallery3.Client.Login(String RESTAPIKey) in C:\Users\Eric\Documents\SharpDevelop Projects\Gallery-3-REST-Client\GalleryLib\GalleryLib.vb:line 180
The zip file did not contain the GalleryLib directory and not sure where I could change the path/generate the needed files (if there is such capability!). Haaalp :\
Posts: 4
Hmm, never mind it worked once I added "index.php" to URL, didn't realize it was required.
And a note, in case someone may run into this unknowingly: I had a forgotten upload going through flash uploader and tried to connect through this app, the server connection was closed upon successful login, so can't do both at the same time.
rWatcher, thank you very much for all your work! Looking forward to using the app
Posts: 52
Great tool!
Anyway to add File ReSize option before uploading?
Thanks!
Posts: 5
Hi rWatcher,
after successfully login to my server i have this error (like splitty):
The remoteserver has give back an error (417).
Expection failed
in Details i can see:
bei System.Net.HttpWebRequest.GetResponse()
bei GalleryLib.Gallery3.Client.Login(String username, String password) in C:\Users\Eric\Documents\SharpDevelop Projects\Gallery-3-REST-Client\GalleryLib\GalleryLib.vb:Zeile 142.
Any ideas? Maybe a langugae problem? I use a german Windows 7 Pro
regards vozzibaer
Posts: 722
Your web server is generating an HTTP 417 error when the REST client requests your accounts API key. Not sure why that would happen, unless the REST module wasn't installed on your Gallery. You could try logging in through the web site and look up your REST API Key on your user's profile page, then use that instead of a login name/password and see if that works any better.
Posts: 5
REST Module is installed and activated. I try API key and username/password. Not working.
vozzibaer
Posts: 14
Hi All,
After setup REST and get my API Key I tryed to connect to a gallery and got the error "Invalid URI: Could not determine the format of the URI".
Any help will be great.
Thanx in advance,
Flávio