barrycarey / SnipeSharp

A c# wrapper for the Snipe IT API
25 stars 30 forks source link

How do I upload an image when creating an asset/model? #27

Open Karl-Qlogic opened 1 year ago

Karl-Qlogic commented 1 year ago

Hey!

How do I upload an image when creating an asset/model? Whenever I set the "Image" to the path of the file, the logs keeps saying that Image is set to null.

Asset currentComputer = new SnipeSharp.Endpoints.Models.Asset { Company = null, AssetTag = systemName, Model = null, StatusLabel = statusLabel, RtdLocation = null, Name = systemName, Serial = serialNumber, WarrantyMonths = warrantyMonths, CustomFields = customFields, Image = PATHTOFILE, UserCanCheckout = true };