Replies: 9 comments 9 replies
-
|
Could we gather a description of how these 2 options function? At face value, I think I would prefer option 1. A bit harder for servers and clients to implement but allows for a much more stable healthier OData servers overall. I do think the size of a request if clients are inserting a listing with all its media should be a serious consideration when considering which of these options to use. I have no desire to proxy base64 encoded photos through our API application. I would much rather give clients a URL to upload to. |
Beta Was this translation helpful? Give feedback.
-
|
After further review there are more hindrances with embedding media directly in a post. Largely identified by servers having file transfers limited to fixed sizes in direct requests that would make embedding files often limited to "only one file" at a time. This is especially the case where a single photo can be over 20 Megabytes these days, and is only getting larger in the future. More often it would be expected that media uploads would come from a server request b2b operation. Upload requests (POST, PATCH) would be better served by providing media URL's leaving it to the receiving server to fetch/stream said resources appropriately. This looks far more likely to be the bulk use case. |
Beta Was this translation helpful? Give feedback.
-
|
One thing I stated in the developer conference as my preference was a pre-signed URL that we can POST to, similar to AWS services. An issue that was brought up during the call was the need to support draft listings if we take that on. An alternative to Draft listings is draft media. If we allow media to be inserted prior to creating the listing, I believe that takes care of that problem. |
Beta Was this translation helpful? Give feedback.
-
|
Proposing settling on 'Media Upload' via 2 supported methods. (One, must be available, both would be nice )
In form '2' where upload requester provides a "StatusCallbackURL" after the operation completes (success/fail/partial success) the entity references can be returned (Standard ODATA success operation) Or (ODATA fail message) [[ Embedded ]]
body
body [[ source URL('s) ]]
body
body |
Beta Was this translation helpful? Give feedback.
-
|
For .NET OData out of the box information I did find some leads: This adding stream support in the first place for v4 The above appears to be included in this from 2021 This was a v3 example from someone who spoke with the OData Web API team and created a custom solution example: OData's vagueness for media update seems to lead to lots of interpretations and custom implementations. |
Beta Was this translation helpful? Give feedback.
-
|
More research needs to be done as to how OData handles Add/Edit with Media and Streams. Also, is the way OData handles this what we want or are there other ways to address it? |
Beta Was this translation helpful? Give feedback.
-
|
One thought on the client providing a URL to the server to then pull the image is that security policies prevent a lot of servers from making any outbound connections, much less to essentially random URLs. |
Beta Was this translation helpful? Give feedback.
-
|
See #88 for a new version of the proposal. |
Beta Was this translation helpful? Give feedback.
-
|
Notes on Base64 encoded single file upload processes Post Testing. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
WebAPI ODATA Edit/Insert
Opening a discussion on ODATA usage in uploading media to a system.
ODATA as a framework for transfer of information is not well geared IMO for file transfers but does have some definition as to 2 main approaches to tackle the issue.
vs
There are different benefits and detractors on both sides of those options but with ease of use for the end user I believe the second approach is far more usable.
The second approach simply expects the file data to be converted to a Base64 data stream in the body of the request.
This approach does not require the sender to have a reachable URL to be called back to, for the receiving server to fetch the stream of data from, it is already included in the request body.
Beta Was this translation helpful? Give feedback.
All reactions