[GH-ISSUE #116] upload seem to not work properly #71

Closed
opened 2026-03-03 16:45:26 +03:00 by kerem · 2 comments
Owner

Originally created by @olivier38070 on GitHub (Sep 29, 2015).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/116

I tried to do upload of image, to smugmug.
I created the api key. I defined the permission properly.

in the demo app, I can authenticate, get information of user, album etc... (with some mint code modification in the demo)
I cannot do any upload

for both, I use the same framework : Oauth1Swift
for upload, I tried postImage() method, and tried to build a modified version of that code.
for upload, I use the information visible here : http://api.smugmug.com/services/api/?method=upload

without the signature calculation fix proposed in another thread, I obtain a "invalid signature" error.
with the signature calculation fix ( compared to the website :
http://oauth.googlecode.com/svn/code/javascript/example/signature.html)
I obtain another error when uploading : System Error 5.
which is something like invalid album

I tried several possibilities :
smugmug API 1.3, API 2.0
Upload using POST, mutlipart, like the code of the sample app does.
Upload using HTTP PUT (I modified the code, to set the body with the image and content-type to image/jpeg)
Upload using HTTP POST (same as above)

I always get the same error. System Error 5.
I think (but I cannot be sure) that there is something not compatible with the framework, and smugmug upload.

could anyone do a test on google account (on my side, it does not work also) or smugmug ?

Originally created by @olivier38070 on GitHub (Sep 29, 2015). Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/116 I tried to do upload of image, to smugmug. I created the api key. I defined the permission properly. in the demo app, I can authenticate, get information of user, album etc... (with some mint code modification in the demo) I cannot do any upload for both, I use the same framework : Oauth1Swift for upload, I tried postImage() method, and tried to build a modified version of that code. for upload, I use the information visible here : http://api.smugmug.com/services/api/?method=upload without the signature calculation fix proposed in another thread, I obtain a "invalid signature" error. with the signature calculation fix ( compared to the website : http://oauth.googlecode.com/svn/code/javascript/example/signature.html) I obtain another error when uploading : System Error 5. which is something like invalid album I tried several possibilities : smugmug API 1.3, API 2.0 Upload using POST, mutlipart, like the code of the sample app does. Upload using HTTP PUT (I modified the code, to set the body with the image and content-type to image/jpeg) Upload using HTTP POST (same as above) I always get the same error. System Error 5. I think (but I cannot be sure) that there is something not compatible with the framework, and smugmug upload. could anyone do a test on google account (on my side, it does not work also) or smugmug ?
kerem closed this issue 2026-03-03 16:45:26 +03:00
Author
Owner

@phimage commented on GitHub (Sep 29, 2015):

your error is something like that
http://dgrin.com/showthread.php?t=233736

try to see upload log in smugmug account (maybe Tools -> Account Settings -> Stats -> Uploads -> Details) for more information

sorry I have no time to code a test, maybe just test with a provided project

<!-- gh-comment-id:144115712 --> @phimage commented on GitHub (Sep 29, 2015): your error is something like that http://dgrin.com/showthread.php?t=233736 try to see upload log in smugmug account (maybe Tools -> Account Settings -> Stats -> Uploads -> Details) for more information sorry I have no time to code a test, maybe just test with a provided project
Author
Owner

@olivier38070 commented on GitHub (Sep 30, 2015):

I wil check. thanks
anyway, I found that in the httprequest code, when there is a body and a content-type, the non oauth parameters were not added.
after fixing that, it works.

I will d a fork soon, and place my code in it, in order to let you see what I did. may be I did it wrong

thanks

<!-- gh-comment-id:144430671 --> @olivier38070 commented on GitHub (Sep 30, 2015): I wil check. thanks anyway, I found that in the httprequest code, when there is a body and a content-type, the non oauth parameters were not added. after fixing that, it works. I will d a fork soon, and place my code in it, in order to let you see what I did. may be I did it wrong thanks
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/OAuthSwift#71
No description provided.