PDA

View Full Version : Original naming convention


elyobelyob
Apr-20-2005, 09:10 AM
Hi, I'm looking to automatically upload photos and retrieve back the new smugmug name. I'm using PHP and MySQL on the current site.

I see that the original filename is used as the caption, but smugmug changes this to fit their system.

I don't mind storing the new name into my MySQL database. I'm not that knowledgable about XML, but willing to learn if neccesary.

Thanks

flyingpylon
Apr-20-2005, 09:23 AM
You might be interested in a free web service I created to do exactly what (I think) you're asking for. It's called Smugmug Exporter, and the link is in my signature.

Smugmug Exporter allows you to select an album and then save all of that album's image metadata (original filename, smugmug ID, caption, size, etc.) to a CSV file, which can then be imported into anything you'd like.

I use it to import smugmug IDs to IMatch (an image management app) so that I can cross-reference my original filenames with their smugmug IDs.

flyingpylon
Apr-20-2005, 09:26 AM
After re-reading your message it looks like you may be after something slightly different. If you're looking to automatically upload and retrieve image IDs, you'll need to use the API. When an image is uploaded, the image ID is returned by the API, which you could then save to your database.

elyobelyob
Apr-20-2005, 09:38 AM
Hi, that's great. It shows its possible to do what I want. However I will be wanting to get the file info back as and when the file is uploaded. Other people will be uploading the files for me, and then I want to be able to link it automatically. I guess I will have to look at the API in depth. A starter for ten in PHP would be ideal! ;)

Thanks

Nick

Nikolai
Apr-20-2005, 09:43 AM
One of the recent S*E features allows you to do just that.
You can have other ppl upload and you'l get an upload email (tuned up to your convenience) with the ids, file name and other info. Email format can be (for now) CSV, tab-delimieted and RPC-XML.
Check www.starexplorer.com (http://www.starexplorer.com).
Let me know if you have any questions.

elyobelyob
Apr-20-2005, 10:15 AM
One of the recent S*E features allows you to do just that.
You can have other ppl upload and you'l get an upload email (tuned up to your convenience) with the ids, file name and other info. Email format can be (for now) CSV, tab-delimieted and RPC-XML.
Check www.starexplorer.com (http://www.starexplorer.com).
Let me know if you have any questions.
Hi,that's great, but they'll be uploading a picture via my own website, and then I will link it to a specific ID. i.e. they'll be uploading a photo of their business (which I will already have the ID) via my website. I will then save the link of that photo on smugmug to my own database.

Looks like I'll be studying the API tomorrow :)

Nikolai
Apr-20-2005, 10:20 AM
Looks like I'll be studying the API tomorrow :)
It's not rocket science, but it definitely takes time to make the whole thing robust and convenient (which is true about every app:-).

Cheers!:1drink

dsdee
Apr-20-2005, 11:40 AM
Actually, I just looked, as I, too, am interested in automating the sync'ing of portions of my collection at home with the subset that i post to SmugMug;

I looked at the API, specifically, at the smugmug.images.getInfo call, and it looks like it should be returning the filename, but it's returning "n/a".

Don, is this a known issue??

sample:

ImageID AlbumID Positi Seria Size Width Height Filename MD5Sum Waterm Format Date Caption
19761998 477208 7 0 885630 944 650 n/a sm-5a434488b 1 JPG 2005-04-15 Glacier at Y
19762089 477208 8 0 4391782 2136 1701 n/a sm-c2c5840b6 1 JPG 2005-04-15 Glacier at Y
19762294 477208 9 0 7213637 3008 1841 n/a sm-2a0efdd56 1 JPG 2005-04-15 Glacier at Y
19762633 477208 10 0 8100150 3008 2000 n/a sm-056d06440 1 JPG 2005-04-15 Glacier at Y





(sorry things didn't line up well; i battled with CODE parameter for 10 minutes and am giving up!)

Thanks,
David
<code><code>
</code></code>

onethumb
Apr-20-2005, 12:13 PM
Actually, I just looked, as I, too, am interested in automating the sync'ing of portions of my collection at home with the subset that i post to SmugMug;

I looked at the API, specifically, at the smugmug.images.getInfo call, and it looks like it should be returning the filename, but it's returning "n/a".

Don, is this a known issue??

sample:

ImageID AlbumID Positi Seria Size Width Height Filename MD5Sum Waterm Format Date Caption
19761998 477208 7 0 885630 944 650 n/a sm-5a434488b 1 JPG 2005-04-15 Glacier at Y
19762089 477208 8 0 4391782 2136 1701 n/a sm-c2c5840b6 1 JPG 2005-04-15 Glacier at Y
19762294 477208 9 0 7213637 3008 1841 n/a sm-2a0efdd56 1 JPG 2005-04-15 Glacier at Y
19762633 477208 10 0 8100150 3008 2000 n/a sm-056d06440 1 JPG 2005-04-15 Glacier at Y





(sorry things didn't line up well; i battled with CODE parameter for 10 minutes and am giving up!)

Thanks,
David
<code><code>
</code></code>

I'm at a conference right now, so I can't do detailed checking, but just guessing: I'll bet you're using a case-sensitive parser, and FileName needs the capped N in the middle. :)

Feel free to tell me I'm wrong, though.

Don

dsdee
Apr-20-2005, 01:17 PM
I'm at a conference right now, so I can't do detailed checking, but just guessing: I'll bet you're using a case-sensitive parser, and FileName needs the capped N in the middle. :)

Feel free to tell me I'm wrong, though.

Don
I'm afraid I can't do that. You were right on the money. I was using "Filename." I guess I didn't expect that perl or RPC::XML module would be returning 'n/a' for an undefined value, and thought the 'n/a' was being returned within the XML. On the way home from work I thought "hey, you oughta dump the XML again and make sure that it's truly not there" but just walked in and saw your posting.

Thanks again, Don.

--d2

elyobelyob
Apr-20-2005, 03:57 PM
I'm afraid I can't do that. You were right on the money. I was using "Filename." I guess I didn't expect that perl or RPC::XML module would be returning 'n/a' for an undefined value, and thought the 'n/a' was being returned within the XML. On the way home from work I thought "hey, you oughta dump the XML again and make sure that it's truly not there" but just walked in and saw your posting.

Thanks again, Don.

--d2
I've made some reasonable advances tonight, and smugmug looks like it could be a go-er. I'm trying to get my API key at the moment. Hopefully I can get one by the time I wake up (yup, it's nearly bedtime). I'm interested in any upload/return call scripts that are available in PHP. I did find a last5.php script.

At the moment I'm not even sure where to download the main methods, but thats because I'm fixated on other things at the moment. Do I need an API key before I can download the methods/classes?

Wish me luck with XML :)

Nick

flyingpylon
Apr-20-2005, 06:04 PM
There's nothing to download. You just call those methods from your app via XML-RPC or REST.