I can't save an image as a blob into my non-versioned table hosted as a feature service. However, I am able to save successfully if I'm pointing to a file geodatabase instead of a feature service.
Could someone advise on how to properly save blobs when referencing a feature service?
Please see the attached PDF for screenshots of example code.
Your code looks fine. We'll take a look at this one alongside the annotation editing issue you already reported (we haven't reached any conclusions yet).
This is going to sound a little random, but what happens if you try to get the TableDefinition from the table using Table.GetDefinition()? I'm talking about the table with the blob field that you are trying to update.
Also, are you able to update a feature class in the same non-versioned feature service that contains a blob field?
It looks like I can get the table definition just fine. Please see the screenshots below. I still get the same error when trying to save blob field within a feature class, and I can save the row just fine if I simply skip the setting of the blob within the buffer.
Let me know if you need anything else.
We've finished our research about this issue. Unfortunately, I determined that this is not an SDK issue after all. It's a deeper issue- we don't support reading and writing blob fields from ArcGIS Server-based feature services. (Technically this isn't true, but the only blob support is within annotation features; generic blob fields are not supported). You cannot read or write blob fields with the Pro user interface, with Python, or with the Pro SDK.
Blob fields are supported in hosted feature services, in enterprise geodatabases, file geodatabases, and mobile geodatabases.
Sorry- this probably isn't the answer you wanted to hear.
Thanks for looking into this!
As a work around, I've changed the blob fields as a text datatype to hold the base 64 string representation of the blob. Based on a few tests, it looks like I can read/write that string representation and encode it back to a blob. I assume this is the only possible way to work with generic blobs when using feature services?
I guess this will only work for tables that you have control over... Welp that's a bummer!