C#
C#

help

Root Question Message

EliasGPS
EliasGPS12/6/2022
❔ version switch

I'm working on a contentful project. I'm trying to publish my assets but it immeditialy changed my version? Can someone help me?
EliasGPS
EliasGPS12/6/2022
EliasGPS
EliasGPS12/6/2022
this is the published information
EliasGPS
EliasGPS12/6/2022
EliasGPS
EliasGPS12/6/2022
this is the second
EliasGPS
EliasGPS12/6/2022
you see the current version changed
EliasGPS
EliasGPS12/6/2022
the code behind this
EliasGPS
EliasGPS12/6/2022
TwitterData twitterData = new TwitterData();
        var profilePicturesList = twitterData.twitter_profilePictures_list_function();

        var counter = 1;
        var asset = new ManagementAsset();

        foreach (var imageUrl in profilePicturesList)
        {

            String new_asset_id = "asset" + counter;


            asset.SystemProperties = new SystemProperties();
            asset.SystemProperties.Id = new_asset_id;
            asset.SystemProperties.Version = 3;

            asset.Title = new Dictionary<string, string> {
            { "en-US", new_asset_id }
            };

            asset.Files = new Dictionary<string, File>
            {
                { "en-US", new File()
                    {
                    ContentType = "TwitterFollowers",
                    FileName = "image.png",
                    UploadUrl = imageUrl
                    }
                }
            };


            await client.CreateOrUpdateAsset(asset);
            await client.ProcessAsset(new_asset_id, 2, "en-US");
            await client.PublishAsset(new_asset_id, 2);
            counter++;

        }
EliasGPS
EliasGPS12/6/2022
EliasGPS
EliasGPS12/6/2022
it gives me this error
EliasGPS
EliasGPS12/6/2022
how am i be able to set current version always on 3
EliasGPS
EliasGPS12/6/2022
without the
await client.PublishAsset(new_asset_id, 2);
i'm be able to send them all
EliasGPS
EliasGPS12/6/2022
EliasGPS
EliasGPS12/6/2022
it the publish one that is doing someting weird
EliasGPS
EliasGPS12/6/2022
EliasGPS
EliasGPS12/6/2022
i dn't uderstand this
ContactFrequently Asked QuestionsJoin The DiscordBugs & Feature RequestsTerms & Privacy