Ok, while I was waiting for you to fix the bugs in uploading via XML-RPC
There is nothing to fix, except your own code.
I understand the feeling of frustration when the darn thing does not work (and some things in API still do not..), but in this case it's not SM problem.
Upload was working fine for the last few months, several of us 3d party guys used it successfully in a variety of tools: python, .NET, apple, win32, etc.
Here, I made an exta run of S*E to give you a working url and sample reply:
I have read all the docs. As far as I can tell my code corresponds to them. You mentioned you saw a mismatch - what were you referring to? Please be specific.
You're using old url with a new method.
No wonder you get "method not found"..
And by the way, this is all for base64 encoded upload, which is like 30% slower than its multipart POST based twin. Nobody's using it for months, AFAIK..
So unless you're pursuing purely academic goals I'd suggest you use upload via post, for which I already gave you an example...
My old-API code, still working as of this morning, used "http://upload.smugmug.com/xmlrpc/" Should I ignore the above doc page and go back to that?
I know that base64 encoding uses 33% more bytes. Since my network connection is fast, this is not significant. Especially compared to the many seconds of processing time once the image gets to smugmug. In any event, as I said, uploading via XML-RPC using the old API and old URLs was still working as of this morning.
My old-API code, still working as of this morning, used "http://upload.smugmug.com/xmlrpc/" Should I ignore the above doc page and go back to that?
I know that base64 encoding uses 33% more bytes. Since my network connection is fast, this is not significant. Especially compared to the many seconds of processing time once the image gets to smugmug. In any event, as I said, uploading via XML-RPC using the old API and old URLs was still working as of this morning.
As I mentioned before, to the best of my knowledge nobody's using "upload" (since for the most of us speed still does matter - try upload 10Gb in one shot, and watch those 30% turning into hours:-), so there is a chance that this particular method actually felt through the cracks, and you're the first one to notice...
When I use XML-RPC to "http://upload.smugmug.com/hack/xmlrpc/ upload", the upload succeeds but returns an empty string as the result, instead of the ImageID.
When I use XML-RPC to "http://upload.smugmug.com/hack/xmlrpc/ upload", the upload succeeds but returns an empty string as the result, instead of the ImageID.
Has the 'Upload via POST' method ever worked for you ?
I had never tried it before this morning when the problems with the regular method cropped up. I'm sure I'm calling it wrong. However, if this upload method's idea of error reporting is to time out, I'm not real interesting in debugging my call.
I had never tried it before this morning when the problems with the regular method cropped up. I'm sure I'm calling it wrong. However, if this upload method's idea of error reporting is to time out, I'm not real interesting in debugging my call.
lol...i understand your frustration.
My bet is that you're not creating the multi-part formdata correctly. With this method since you are posting data, like submitting a html form, if the data you post to the form is not correct, it is inconceivable that the page will never return anything.
It's pretty simple to work through and this is the "preferred" method for uploading, since you don't have to do the base64 encoding.
sorry I was half asleep when I read this originally. If you are getting 'method not found', then that is a problem, I had this with a few functions calls for this new API release. It obviously hasn't been picked up since most people don't use that call.
Post this bug description as a new thread so that Don is more likely to see it.
Comments
There is nothing to fix, except your own code.
I understand the feeling of frustration when the darn thing does not work (and some things in API still do not..), but in this case it's not SM problem.
Upload was working fine for the last few months, several of us 3d party guys used it successfully in a variety of tools: python, .NET, apple, win32, etc.
Here, I made an exta run of S*E to give you a working url and sample reply:
[PHP]
Multipart post to:
https://upload.smugmug.com/photos/xmladd.mg
Response:
<?xml version='1.0' encoding="iso-8859-1" ?>
<methodResponse>
<params>
<param>
<value>
<int>album id here</int>
</value>
</param>
</params>
</methodResponse>
[/PHP]
I used hhtps, but it works with http, too.
HTH
PS
Read *all* the docs, man:-)
Here it is You're using old url with a new method.
No wonder you get "method not found"..
And by the way, this is all for base64 encoded upload, which is like 30% slower than its multipart POST based twin. Nobody's using it for months, AFAIK..
So unless you're pursuing purely academic goals I'd suggest you use upload via post, for which I already gave you an example...
HTH
My old-API code, still working as of this morning, used "http://upload.smugmug.com/xmlrpc/" Should I ignore the above doc page and go back to that?
I know that base64 encoding uses 33% more bytes. Since my network connection is fast, this is not significant. Especially compared to the many seconds of processing time once the image gets to smugmug. In any event, as I said, uploading via XML-RPC using the old API and old URLs was still working as of this morning.
As I mentioned before, to the best of my knowledge nobody's using "upload" (since for the most of us speed still does matter - try upload 10Gb in one shot, and watch those 30% turning into hours:-), so there is a chance that this particular method actually felt through the cracks, and you're the first one to notice...
It will be up to Don then..
Good luck!
I stopped using base64 upload method in January, never touched it since.. I was much more concerned over other APIs that did not work at the time..
just to clarify, which method are you using...
Upload via post or smugmug.images.upload ??
David
SmugMug API Developer
My Photos
When I use XML-RPC to "http://upload.smugmug.com/hack/xmlrpc/ smugmug.images.upload", I get a method not found fault.
When I use XML-RPC to "http://upload.smugmug.com/hack/xmlrpc/ upload", the upload succeeds but returns an empty string as the result, instead of the ImageID.
When I try to use POST to "http://upload.smugmug.com/photos/xmladd.mg", I just get a timeout.
I think the above mentioned doc is a be misleading...
for xml-rpc uploads using smugmug.images.upload use url...
http://upload.smugmug.com/hack/xmlrpc/
for uploads via POST use url...
http://upload.smugmug.com/photos/xmladd.mg
Hope this helps,
David
SmugMug API Developer
My Photos
I think you will find most people here you that method.
Can you include your POSTDATA for the 'Upload via POST' method so we can have a look at it ?
David
SmugMug API Developer
My Photos
Aren't those the URLs I just said I'm using? Am I failing to see some subtle difference in spelling or punctuation?
I had never tried it before this morning when the problems with the regular method cropped up. I'm sure I'm calling it wrong. However, if this upload method's idea of error reporting is to time out, I'm not real interesting in debugging my call.
My bet is that you're not creating the multi-part formdata correctly. With this method since you are posting data, like submitting a html form, if the data you post to the form is not correct, it is inconceivable that the page will never return anything.
It's pretty simple to work through and this is the "preferred" method for uploading, since you don't have to do the base64 encoding.
Just for reference here's sample postdata...
--111222111
Content-disposition: form-data;name="SessionID"
[SessionID]
--111222111
Content-disposition: form-data;name="Version"
1.0
--111222111
Content-disposition: form-data;name="AlbumID"
[AlbumID]
--111222111
Content-disposition: form-data;name="ByteCount"
[FileSize]
--111222111
Content-Transfer-Encoding: binary
Content-disposition: form-data;name="filename";filename="[FileName]"
Content-Type: image/jpeg
Content-Length: [FileSize]
[ImageData]
--111222111--
Hope this helps,
David
SmugMug API Developer
My Photos
What was the problem you saw with the URLs? I didn't see any difference between what I posted and what you posted.
Sorry
SmugMug API Developer
My Photos
sorry I was half asleep when I read this originally. If you are getting 'method not found', then that is a problem, I had this with a few functions calls for this new API release. It obviously hasn't been picked up since most people don't use that call.
Post this bug description as a new thread so that Don is more likely to see it.
David
SmugMug API Developer
My Photos