cancel
Showing results for 
Search instead for 
Did you mean: 

Posting file to navigation property - 405 Method not allowed

Former Member
0 Kudos

Dear experts,

I am trying to implement posting file through navigation property, so I can access key fields in CREATE_STREAM method. This approach is based on Matt's suggestion here

I created this simple structure oData service.Key field is Email for both entities. UserPhoto is media entity.

Now the issue:

I can access CREATE_STREAM directly - /ZSA_USERS_SRV/UserPhotoSet/

I can access GET_USERPHOTO_GET_ENTITY by navigation (and I also can see key field) - /sap/opu/odata/SAP/ZSA_USERS_SRV/UserSet('john@doe.com')/Photo

But when I try to post file to /sap/opu/odata/SAP/ZSA_USERS_SRV/UserSet('john@doe.com')/Photo

I get 405 Method not allowed - The specified HTTP method is not allowed for the resource identified by the Data Service Request URI.

Can you please help me which kind of setting did I forget to switch on?

Thank you,

Peter

Accepted Solutions (1)

Accepted Solutions (1)

kammaje_cis
Active Contributor

Peter,

Check Ron's reply here.

May be you can try by marking the target cardinality as N instead of 1. I don't have a logical reasoning though.

Krishna

Former Member
0 Kudos

Krishna,

I changed cardinality from 1...1 to 1...N and it works now!

Thank you very much,

Peter

Answers (0)