Tell me more ×
SmugMug Stack Exchange is a question and answer site for SmugMug developers and end users. It's 100% free, no registration required.

Probably just missing something in the documentation, but I have been pecking at this for a while.

if I use the command

$a=$f->images_upload( "AlbumID=$albumid", "File=$filepath", "Caption='$caption'", "Heavy=1");

I seem not to be able to extract any kind of response. Can someone put me out of my misery and tell me what I need to do to $a or $f to get the response to see if my upload was successful? Tried a variety of print_r and print to analyze this, but no luck

share|improve this question

1 Answer

Answering: And the answer is that the response is indeed in the variable $a above except if the upload fails, in which case the variable has no value.

Easy enough to test, might be a good thing to have in the docs. Or at least, if it's there, would have been nice to be easier to find. Silent fails can be hard. Ask any mime.

share|improve this answer
Correct. The images_upload method should behave like all the other methods and return the response from the API. I'll check this this week and update the phpSmug docs to reflect this. – lildude Dec 30 '12 at 16:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.