Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login
    1. Home
    2. joshuagilman_1054
    3. Best

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    J Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 10
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: How to set content type of asset with API?

      Alternatively, you can use the PS module I've been developing:

      $> Install-Module Posh-ProGet
      $> Import-Module Posh-ProGet
      $> $session = New-ProGetSession -Address 'http://proget.mysite.io:8624' -ApiToken 'mytoken'
      $> $feed = New-ProGetFeedObject @{Name='test-feed';FeedType='asset';Active=$true}
      $> New-ProGetFeed $session $feed
      $> $content = "#My File \n This is a test!"
      $> New-ProGetAsset $session $feed.Name "test.md" -ContentType 'text/plain' -Content $Content
      $> Get-ProGetAssets $session $feed.Name
      
      # Name     : test.md
      # Parent   :
      # Type     : application/octet-stream
      # Content  : http://proget.mysite.io:8624/endpoints/test-feed/content/test.md
      # Created  : 2021-03-30T04:36:21.59Z
      # Modified : 2021-03-30T04:36:21.59Z
      # Size     : 27
      # md5      : 25a7e1e4f8e8c8d387f3e5dde6f6f2a6
      # Sha1     : c584e7c125d41a9a8123f69040f30673c66c97bd
      # Sha256   : 460c44334aee7966339ad4c9c749aa67b9841dcfd7d67348fc2395a7b8adf7e4
      # Sha512   : 293be0c9cfffa1c939c2b711d4165073c3efb200ed25e0adb2bf1f88d0a2343f71a62d99265aa27560630a9643124182ee9774e713bd
                 c468d2014681325b8e41
      
      posted in Support
      J
      joshuagilman_1054
    • 1 / 1