Coder Social home page Coder Social logo

bynder-c-sharp-sdk's People

Contributors

alz-milestone avatar arpit-sharma-usc avatar betacar avatar condemil avatar danielsequeira avatar dottech avatar joanm avatar kunalshetye avatar kurucz09 avatar martensies avatar michaelchart avatar thegreatdeku avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bynder-c-sharp-sdk's Issues

OAuth setup with relative urls breaks with Tridion integration (SDK v1.2.2)

Example Configuration:
https://internal-api-gateway/bynder/

Expected API Call : https://internal-api-gateway/bynder/api/media
Actual API Call : https://internal-api-gateway/api/media

Notice that the /bynder gets stripped out because of how Uri's in C# are combined.

The code change required for this bugfix can be found here: kunalshetye@c367849

Unfortunately it's not possible for me to open a Pull Request since the Master Branch is way ahead of SDK v1.2.2

Passing metaproperties on new asset upload / add later

Hi!

I'm trying to automate bulk uploading of documents to Bynder. I got around to uploading the files themselves, and there is never an issue with a new version for assets with the metaproperties already given.
However, when I'm uploading a new asset/media, I need to be able to pass some properties (i.e. job number, visibility, asset-type, etc...) along with the upload.
I don't think there is a method for this with this SDK, and I'm struggling to figure out, which class and how to alter, to be able to pass the required data.
I'm also not sure whether to approach this issue from uploading with the properties to begin with, or once uploaded, find the match in the medialist through the (default name = filename), and passing/filling the dictionary with the needed data.

I can retrieve these from existing media with (once I have a list of media) media.PropertyOptionsDictionary[] and specifying the name (e.g. "property_job_number") of the value I'm looking for.

Converter did not finished. Upload not completed

I'm getting this error message for a lot JPEG images I'm uploader.

Bynder C# SDK. Fileuploader.cs Line 112

throw new BynderUploadException("Converter did not finished. Upload not completed");

Below is an example image that is giving me the exception.

1580725-JPG High

Error while installing nuget package

Hi Team,
I am trying to install the NuGet package in my .Net console application (.Net Framework 4.5.2) but I am getting below error.
Could not install package 'Bynder.Sdk 2.0.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5.2', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

Is there any other type of project require. I want it as a console application, so i can create a scheduler for it.

Invalid Signature

Using the SDK to test making calls to the API. Getting Invalid signature using the sample client against our API. Used this site (http://lti.tools/oauth/) to verify the signature and it matches what is generated by the client. Not sure if client is incorrect or the API is.

Allow additional handlers in chain

I have a requirement to inject additional DelegatingHandlers into the request chain when calling Bynder. For example, I use a handler that logs all requests and responses. Or, one may choose to enrich the HttpClientHandler with corporate proxy settings.

Currently, I'm accomplishing this by modifying internal code deep within the SDK. I would prefer not to fork the SDK.

Would you welcome a PR that introduced an override to the BynderApiFactory, allowing the developer to pass in a handler chain?

Add missing 'Labels' property to 'Metaproperty' and 'MetapropertyOption' models

Greetings Bynder developers,

I noticed that 'Metaproperty' and 'MetapropertyOption' models are missing properties that are returned as part of the json response content.
However the 'AssetService.GetMetapropertiesAsync' method does not expose all the data.

See the public documentation for a reference.

Please extend the models, so we do not have to fork the repository. Thanks!

Under Bynder.Sdk.Model.Metaproperty and Bynder.Sdk.Model.MetapropertyOption consider adding

/// <summary>
/// Label translation by culture (e.g. 'en_US', 'de_DE' and etc)
/// </summary>
[JsonProperty("labels")]
public IDictionary<string, string> Labels { get; set; } = new Dictionary<string, string>();

OAuth 1.0a support discontinued?

We have been using the OAuth 1.0a authentication with version 1.3 of this SDK.

We have been using a permanent access token which means we don't need to deal with refreshing expired tokens or any kind of browser redirect flow.

It seems like the latest changes to this SDK have removed support for consumers and permanent access tokens in favour of only supporting the OAuth 2.0 implementation.

If the OAuth 2.0 implementation is the way forwards, then how would this be used in a purely server-side scenario where an application is accessing the Bynder API but there is no user interaction or browser involved? Do we now need to deal with refreshing access tokens too?

FS_upload_dev branch missing fields on upload

While adding some missing features to the api in my fork (such as upload directly from a stream and metaproperty endpoints) I noticed that the FS_upload_dev branch I've been using as a base results in some fields not being populated on upload.

Upload through filepath on master:

{
   "height": 2880,
   "fileSize": 1574336,
   "width": 4095
}

Upload through filepath on FS_upload_dev:

{
   "height": 0,
   "fileSize": 0,
   "width": 0
}

So these three fields are missing in the api response when retrieving media ({{base_url}}/api/v4/media/{{mediaId}}).
In the portal UI itself there are more fields missing: copyright, author and resolution. Where the latter two cannot even be set at all.

Is this a result from the more direct upload to S3 that is skipping a process on Bynders end?
And is there anything that can be done to fix this?

Anonymous save not allowed error thrown by SaveMediaAsync

We are having issues with uploading assets using the SDK.
The call to SaveMediaAsync always results in an exception (result from the API) with the message Anonymous save is not allowed (statuscode 403).

When we follow the same steps, with the same data, but using Postman, the upload succeeds.
Only when we try it via .NET it fails.

Let me know if you need help reproducing the error.

IAssetService.GetMediaListAsync() - filtering by PropertyOptionId does not seem to work.

I'm using the following code to try and query Bynder

var mediaList = assetService.GetMediaListAsync(new MediaQuery()
{                        
    BrandId = brandID,                   
    Page = page,
    PropertyOptionId= new List<string>() { "788FBBCC-F382-4E26-982C4CD0FEA7FD07"},
    Limit = 1000
}).Result;

The PropertyOptionId does not seem to influence the number of returned items. If I change the GUID to anything, I still get the same number of results returned.

I would expected an empty list to be returned if I used the following:

PropertyOptionId= new List<string>() { "blah"},

I'm obtaining the OptionID from calling assetService.GetMetapropertiesAsync()

Ability to Add Thumbnail Image

We have a need in our API to add a different thumbnail image to a asset. It would be great if the API could be enhanced to allow for that.

Error while invoking Upload Init API

bynder-c-sharp-sdk-master.zip

Hi Team,
As discussed in the call, we are posting the source code after removing the token secrets and Customer key/secret is there in the app.config file. We attached the error which are getting while invoking Upload API. In addition to this error, we are getting another error "IOException:The handshake failed due to an unexpected pocket format."

error

Uploads Complete Without Error, Download URL Not Available (File Lost)

We are seeing files that upload through the SDK & APIs without a problem, but when we go to check immediately after uploading for the file's s3 download URL, it returns nothing (null or empty string). When we go and check on the UI, we also cannot download the file, so it's essentially lost.

This has been on-going for a few months now, we had some code after the SDK to check that the URL for downloading worked, and if not we would retain the file and retry later. We disabled that temporarily and found that this issue is still happening.

We did modify the UploadFileAsync slightly, but only to allow uploading by Base64.

public async Task UploadFileAsync(UploadQuery query)
        {
            var uploadRequest = await RequestUploadInformationAsync(new RequestUploadQuery { Filename = query.Filename }).ConfigureAwait(false);

            uint chunkNumber = 0;

            if (!string.IsNullOrEmpty(query.Filepath)) {
                using var file = File.Open(query.Filepath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite | FileShare.Delete); int bytesRead = 0;
                var buffer = new byte[CHUNK_SIZE];
                long numberOfChunks = (file.Length + CHUNK_SIZE - 1) / CHUNK_SIZE;

                while ((bytesRead = file.Read(buffer, 0, buffer.Length)) > 0) {
                    ++chunkNumber;
                    await UploadPartAsync(Path.GetFileName(query.Filepath), buffer, bytesRead, chunkNumber, uploadRequest, (uint)numberOfChunks).ConfigureAwait(false);
                }
            } else if (!string.IsNullOrEmpty(query.Base64)) {
                byte[] bytes = Convert.FromBase64String(query.Base64);

                using MemoryStream file = new MemoryStream(bytes); int bytesRead = 0;
                var buffer = new byte[CHUNK_SIZE];
                long numberOfChunks = (file.Length + CHUNK_SIZE - 1) / CHUNK_SIZE;

                while ((bytesRead = file.Read(buffer, 0, buffer.Length)) > 0) {
                    ++chunkNumber;
                    await UploadPartAsync(query.Filename, buffer, bytesRead, chunkNumber, uploadRequest, (uint)numberOfChunks).ConfigureAwait(false);
                }
            } else if (query.Filebytes != null && query.Filebytes.Length > 0) {
                byte[] bytes = query.Filebytes;

                using MemoryStream file = new MemoryStream(bytes); int bytesRead = 0;
                var buffer = new byte[CHUNK_SIZE];
                long numberOfChunks = (file.Length + CHUNK_SIZE - 1) / CHUNK_SIZE;

                while ((bytesRead = file.Read(buffer, 0, buffer.Length)) > 0) {
                    ++chunkNumber;
                    await UploadPartAsync(query.Filename, buffer, bytesRead, chunkNumber, uploadRequest, (uint)numberOfChunks).ConfigureAwait(false);
                }
            }

            var finalizeResponse = await FinalizeUploadAsync(uploadRequest, chunkNumber).ConfigureAwait(false);

            if (await HasFinishedSuccessfullyAsync(finalizeResponse).ConfigureAwait(false))
            {
                var saveMediaQuery = new SaveMediaQuery {
                    Filename = query.Filename,
                    BrandId = query.BrandId,
                    ImportId = finalizeResponse.ImportId,
                    MediaId = query.MediaId,
                    Tags = query.Tags,
                    RelatedMediaMetapropertyId = query.RelatedMediaMetapropertyId,
                    DepartmentMetapropertyId = query.DepartmentMetapropertyId
                };

                if (!string.IsNullOrEmpty(query.RelatedMediaMetapropertyId) && !string.IsNullOrEmpty(query.RelatedMediaId)) {
                    saveMediaQuery.RelatedMediaMetapropertyValues = new List<string> { query.RelatedMediaId };
                }

                if (!string.IsNullOrEmpty(query.DepartmentMetapropertyId) && !string.IsNullOrEmpty(query.Department)) {
                    saveMediaQuery.DepartmentMetapropertyValues = new List<string> { query.Department };
                }

                var savedAsset = await SaveMediaAsync(saveMediaQuery).ConfigureAwait(false);
                query.MediaId = savedAsset.MediaId;
                Console.WriteLine($"Uploaded File Id {savedAsset.MediaId}");
            }
            else
            {
                // need to add to a processing queue
                throw new BynderUploadException("Converter did not finish. Upload not completed");
            }
        }

How to find specific asset via metadata

Hi
Just getting started with an integration to Bynder.
I am using the SDK for C# and have gotten it up and running.
The application we are developing should find an asset (image)
by metadata associated to a particular image – that is the goal at least.

What I can read from the api documentation, is that I could use “property_NAME” to find my asset.
But in the SDK there is no such property in the “MediaQuery” class for C#.

How would I find an image via the SDK in my case? Perhaps I have missed something?

Best regards
/Peraxel, Zitac Solutions (Bynder partner)
[email protected]

Support property_NAME in MediaQuery

As far as I can tell the SDK is missing the option filter by property_NAME, as per the API documentation. As we need that I added this to my already existing copy of the SDK (waiting on #74 to move back to the official SDK). I am considering doing a PR on it, but I'm unsure how you prefer to add this as it is a bit of an odd API IMO. So I'm running with what currently works locally and thought it better to open an issue for discussion first before finishing a PR on it.

The issue is that the Key is not static so the current ApiField attribute doesn't really fit that well. What I ended up doing is adding a new ITypeToPropertyConverter (and backing converter implementation) and special handling this in QueryDecoder.ConvertProperty(). In ConvertProperty() I pass the parameters dictionary to the converted, so the Converter is responsible for adding the parameters instead of this happening in QueryDecoder.AddParam(), so I can control the name added to the dictionary.

It does feel a bit "out of place" though IMO and I also have a bit of a hard time coming up with a proper abstraction, so right now it is only serving that one use case. It also doesn't align with methods on ITypeToStringConverter/ITypeToDictionaryConverter which is shame IMO. One solution to that would ofc. be to change those types. I basically has a method call AddParameters(), which is called instead of Convert(), like so:

else if (Activator.CreateInstance(apiField.Converter) is ITypeToPropertyConverter namePropertyConverter
    && namePropertyConverter.CanConvert(propertyInfo.PropertyType))
{
    namePropertyConverter.AddParameters(parameters, apiField.ApiName, value);
}

Thoughts on how to add this API?

HttpClient and using not working well in .NET core

It's about the following code:

using (var client = new HttpClient())

And see the following article for an explanation on this:
https://www.aspnetmonsters.com/2016/08/2016-08-27-httpclientwrong/

But using a singleton (via a static) can also have issues, like:
https://byterot.blogspot.com/2016/07/singleton-httpclient-dns.html

Since with this SDK, you can't really rely on Dependency Injection, I would prefer that all HttpClients, this SDK is using, can be injected and configured with Dependency Injection (which deals with the cleanup as well) and otherwise set 1 HttpClient per instance of the API objects.

Intermittent API Post Success

I am getting intermittent success when using post commends through the C# SDK API calls in a sandbox environment. For example, the C# call below will work sometimes but not others...

var collectionNew = client.GetCollectionService().CreateCollectionAsync(new CreateCollectionQuery(collectionName)).Status;

Running Fiddler, I sometimes don't get any feedback from the call and other times I receive the error...

The request body did not contain the specified number of bytes. Got 0, expected xx

Authentication issues when introducing create asset usage call.

Hi,

We came across this authentication issue when we were adding the asset usage calls to release version 1.3 of this SDK.

We are using OAuth 1.0 for authentication and all calls under the api/v4 version of the Bynder API are working with the current setup. When implementing the create asset usage call which uses an unversioned endpoint (/api/media/usage/) we keep getting a 401 error.

When contacting Bynder support they claim you can't add the payload for the post request to both the body and the query string which is the case for all post calls included in the Bynder SDK. The create asset usage call only works with the payload included in the body and not in the query string.

But the authentication OAuthMessageHandler.GenerateSignature method requires the query string payload in order to generate a correct signature.

So this is quite inconsistent behavior between the existing SDK and the Bynder API.
Can someone from the team please take a look at it and give some useful feedback?

Thanks!

Kind regards,
Sam Den Haerynck
delaware

Calling Bynder GetAssetService().UploadFileAsync()

We have not been able to pinpoint why but using the SDK we get this error periodically:

SendHttpRequest - Status: InternalServerError Body: {"message":"Could not complete upload","retry":1,"success":false} Headers: Connection = keep-alive, Date = Wed, 03 Nov 2021 11:02:59 GMT, Server = nginx, Cache-Control = no-store, must-revalidate, no-cache, X-Frame-Options = SAMEORIGIN, Access-Control-Allow-Origin = *, Access-Control-Allow-Credentials = true, Access-Control-Allow-Methods = GET, POST, PUT, DELETE, OPTIONS, Access-Control-Allow-Headers = DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,X-Bynder-Integration, X-Cache = Error from cloudfront, Via = 1.1 930a139903fb043f0be58fe5e0a67072.cloudfront.net (CloudFront), X-Amz-Cf-Pop = SFO53-C1, X-Amz-Cf-Id = FDh7EEIkCVHbjiEW58z9fuyECqs2YFoNpD2iMkxSLjNNAnNyhWgMlA==

I got this back from support:
Hi,

I got some insight to share with you from the team. The “error” that you are receiving is a valid one. It means that the upload is not ready yet and that the call (poll) to check the status needs to be retried.

It could be that sometimes an upload takes longer to be processed before it’s returned in the “done” array. Especially if you batch upload the polling status can take longer than when checking for a single upload.

Also, the load on Bynder itself at any moment in time can cause uploads to take longer to be processed completely. In this case the integration needs to keep on polling until it get the items in the done array.

Additionally, we are going to make improvements to the upload process with File Services. I don't have all the info on all the proposed changes but based off my conversation with the team there will no longer be a need to poll for items as the conversion will just happen in the background.

I hope the above info helps, let me know if you have any further questions on this or if we can close out this ticket. Thanks.

Just posting incase someone else has ran into similar issue we will continue to monitor.

ActiveOriginalFocusPoint issue. Exception being thrown when Media is deserialized

Hello,

The issue that we are facing is that when we request 'Media' data via the SDK, we get an exception being thrown.
Thus this requires us to fork the repository.

The exception for a refence is

Newtonsoft.Json.JsonReaderException: 'Input string '266.5' is not a valid integer. Path 'activeOriginalFocusPoint.y', line 1, position 4425.'

This is due to the property defined in the Media.cs file.

/// <summary>
/// Active focus point in the original media item, defined
/// by an x,y coordinate.
/// </summary>
[JsonProperty("activeOriginalFocusPoint")]
public IDictionary<string, int> ActiveOriginalFocusPoint { get; set; }

The data type has a mismatch and Newtonsoft is complaining about it when it deserializes the object by throwing the exception.

Since this deserialization is done in the 'ApiRequestSender.SendRequestAsync()' method, we can not pass 'JsonSerializerSettings', so we can not override this behavior.

I understand that an existing Tier-1 client is having difficulties this being 'double' or 'float'.

There a bunch of ways to skin a cat.
Lets discuss how we will deal with this one.

Yosif

Has issue when uploading file

Hi team,
I have used Bynder SDK in .NET Core 3.1 Console app and tried to upload an image file and I've got 2 exceptions:

  1. It can't deserialize {"status":"ok"} because of Unexpected character encountered while parsing value: {. Path '', line 1, position 1. in the response of the POST request to /api/v4/upload/fi5.BXpTNa7Bhqx6qSyajtT77vYqAYZWv4B2NRT5qNe_BKiwMphQNRPqN3Mv6D2Cde9C0TqqXl7EKxBo9fqN8FZmmPPt1lWP_iZEYc1hPuroVujpt2TGdDQ4PemXbzdkElWN2dPEztVoWE4kBAQ--/ (ApiRequestSender.cs line ~97).
  2. If I use a try-catch to bypass the previous one, I've got 400 Bad Request response when calling polling because in ( FileUploader.cs line 174 ) PollQuery.cs , the ListConverter is never used to convert the Items which is a List to string.

If I use try-catch with the 1 and convert by myself for the 2, the uploading will be successful.

Do you have any ideas?

Thanks and best regards,
Toan K

Could not load file or assembly netstandard, Version=2.1

Executing a .Net Framework 4.8 WebService that references the Bynder.SDK and was built on a DevOps Visual Studio 2019 pipeline fails on WebService execution.

This error displays when invoking any method of the service:

Server Error in '/' Application.
Could not load file or assembly 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileLoadException: Could not load file or assembly 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Assembly Load Trace: The following information can be helpful to determine why the assembly 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' could not be loaded.


Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable  C:\Windows\SysWOW64\inetsrv\w3wp.exe
--- A detailed error log follows. 

=== Pre-bind state information ===
LOG: DisplayName = netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
 (Fully-specified)
LOG: Appbase = file:///C:/Websites/arthurOOHService/
LOG: Initial PrivatePath = C:\Websites\arthurOOHService\bin
Calling assembly : Bynder.Sdk, Version=2.2.11.0, Culture=neutral, PublicKeyToken=204a8d38a1aad545.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Websites\arthurOOHService\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/39af5a76/43c7f0a6/netstandard.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/39af5a76/43c7f0a6/netstandard/netstandard.DLL.
LOG: Attempting download of new URL file:///C:/Websites/arthurOOHService/bin/netstandard.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Minor Version
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

Stack Trace:


[FileLoadException: Could not load file or assembly 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
   System.Signature.GetSignature(Void* pCorSig, Int32 cCorSig, RuntimeFieldHandleInternal fieldHandle, IRuntimeMethodInfo methodHandle, RuntimeType declaringType) +0
   System.Reflection.RuntimeMethodInfo.get_ReturnType() +44
   System.Reflection.RuntimeMethodInfo.ToString() +32
   System.Web.Services.WebMethodReflector.GetMethods(Type type) +239
   System.Web.Services.Description.ServiceDescriptionReflector.Reflect(Type type, String url) +63
   System.Web.Services.Protocols.DocumentationServerType..ctor(Type type, String uri, Boolean excludeSchemeHostPortFromCachingKey) +248
   System.Web.Services.Protocols.DocumentationServerProtocol.Initialize() +463
   System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing) +127

[InvalidOperationException: Unable to handle request.]
   System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing) +333
   System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response) +179

[InvalidOperationException: Failed to handle request.]
   System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response) +390
   System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath) +225
   System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated) +48
   System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +386
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +50
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +163

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4494.0


The DevOps Build for the WebService is error-free.

The Fuslogvw log entry for the .NetStandard library references Bynder.Sdk

*** Assembly Binder Log Entry  (4/20/2023 @ 1:12:29 PM) ***

The operation failed.
Bind result: hr = 0x80131040. No description available.

Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable  C:\Windows\SysWOW64\inetsrv\w3wp.exe
--- A detailed error log follows. 

=== Pre-bind state information ===
LOG: DisplayName = netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
 (Fully-specified)
LOG: Appbase = file:///C:/Websites/arthurOOHService/
LOG: Initial PrivatePath = C:\Websites\arthurOOHService\bin
LOG: Dynamic Base = C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\39af5a76
LOG: Cache Base = C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\39af5a76
LOG: AppName = 43c7f0a6
Calling assembly : Bynder.Sdk, Version=2.2.11.0, Culture=neutral, PublicKeyToken=204a8d38a1aad545.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Websites\arthurOOHService\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/39af5a76/43c7f0a6/netstandard.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/39af5a76/43c7f0a6/netstandard/netstandard.DLL.
LOG: Attempting download of new URL file:///C:/Websites/arthurOOHService/bin/netstandard.DLL.
LOG: Assembly download was successful. Attempting setup of file: C:\Websites\arthurOOHService\bin\netstandard.dll
LOG: Entering download cache setup phase.
LOG: Assembly Name is: netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
WRN: Comparing the assembly name resulted in the mismatch: Minor Version
ERR: The assembly reference did not match the assembly definition found.
ERR: Setup failed with hr = 0x80131040.
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

Any light shed would be most appreciated, thanks.

Mark Macaulay

Uploaded image getting resized

Hi there

I have observed that the C# SDK resizes the original image.
Uploaded image 344 KB
Original version of image after upload 45.6 KB

Regards
Vijay

MediaQuery in API

How does one add filters to their MediaQuery object? I want an analogy to the following query:

GET: https://domain.com/api/v4/media?limit=100&page=1&property_Channel=Digital&property_ChannelSubType=Salsify&property_UsageRights=Active

This doesn't seem to work. It doesn't give me a BadRequest either.

new MediaQuery
        {
            Limit = 100,
            Page = 1,
            PropertyOptionId = new List<string>
                {
                    "property_UsageRights:Active",
                    "property_Channel:Digital",
                    "property_ChannelSubType:Salsify",
                    "property_UsageRights:Active"
                }
        };

Pro tip: If PropertyOptionsId represents a collection, then it should probably have a pluralized name.

Error in retrieving Media on activeOriginalFocusPoint as int, but gets a decimal

I'm proposing that the structure of Media.ActiveOriginalFocusPoint get changed, where it doesn't expect an int, but a decimal.

public IDictionary<string, int> ActiveOriginalFocusPoint { get; set; }

This is the error I get:

Newtonsoft.Json.JsonReaderException: 'Input string '268.5' is not a valid integer. Path 'activeOriginalFocusPoint.y', line 1, position 2591.'

image

It tries to fit a decimal value inside an int, which doesn't work.
If you change the datatype from int to decimal, that should fix the problem.

Kind regards,

Michiel

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.