images.uploadFromURL support for filenames?

calitkocalitko Registered Users Posts: 3 Beginner grinner
Hello, I'm looking at http://wiki.smugmug.net/display/SmugMug/smugmug.images.uploadFromURL+1.2.1 and the comment there claims that the param Filename can be specified to override the uploaded filename. Neither Filename nor FileName is working for me and the uploaded image has an empty filename. Even though Caption is documented as required, the api call works for me even if Caption is empty. I wish it were possible to specify the upload filename because I like sorting my galleries by filename and this would be impossible for galleries imported from other sources, if I used uploadFromURL to do the import. Any thoughts what I'm doing wrong if it's supposed to work? Plans to make it work if it doesn't? It seems like it would be mostly trivial to support the Filename parameter.
Thanks in advance,
Peter

Comments

  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited April 28, 2010
    G'day Peter,

    The FileName parameter works fine for me with both 1.2.1 and 1.2.2 using smugmug.images.uploadFromURL.

    Make sure the case of the parameter is the same.

    Cheers,

    David
    David Parry
    SmugMug API Developer
    My Photos
  • calitkocalitko Registered Users Posts: 3 Beginner grinner
    edited April 29, 2010
    Thanks for the reply, David! You were correct about the case of the param name. I had tried both in my client code, but my modified cpan WWW::SmugMug::API lib was only passing on Filename and not FileName. Got it fixed now and it works great!
    Thanks,
    Peter
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited April 29, 2010
    Hey Peter,

    In regard to some of the other questions you asked on zendesk.

    Firstly, please use API 1.2.2 as it has more recent functionality and better documentation.

    Secondly, the smart gallery stuff is pretty new and we don't currently have full support. But you can determine what type of image it is within the gallery by adding &Extras=Type (1.2.2 only) to smugmug.images.get which will return Album, Collected or Smart.

    Hope this helps.

    Cheers,

    David
    David Parry
    SmugMug API Developer
    My Photos
  • calitkocalitko Registered Users Posts: 3 Beginner grinner
    edited April 29, 2010
    Hi David,
    Thanks for pointing me to the newer docs - they are much nicer! I have a few more questions the answers for which I couldn't find in the docs though:
    - can I create a copy of a photo to a different album without re-uploading?
    - does the API provide for a way to collect an already uploaded photo in a different album?
    - even though I can get the correct URLs, I cannot download the actual files unless I'm downloading them from a browser in which I'm logged in as my user. I think this is due to my privacy settings but hopefully there would be a way to download the images using the API session. I tried setting the X-Smug-SessionID header but it didn't help and I'm still getting 404. Any ideas?
    Thanks in advance,
    Peter
Sign In or Register to comment.