Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import-VroResourceElement upload plain text resources as "application/octet-stream" content type #11

Closed
cjchacon opened this issue Apr 13, 2018 · 1 comment
Milestone

Comments

@cjchacon
Copy link

Steps to reproduce

$category = Get-vROCategory -CategoryType 'ResourceElementCategory' | ogv -PassThru
echo echo "{`n`t`"Names`": [`n`t`t`"Chacón`",`n`t`t`"Es-Es`",`n`t`t`"Está`"`n`t]`n}" > example.json
Import-vROResourceElement -CategoryId $category.ID -File .\example.json -Verbose -Debug -Confirm:$false

imagen

Expected behavior

Plain text resources should be uploaded as "text/plain".

Actual behavior

Plain text files are uploaded as "application/octet-stream"

Environment data

> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      5.1.15063.502
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.15063.502
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

> $vROConnection
Server             : https://pcloudportal:443
Username           : x
EncodedPassword    : x
Version            : 7.3.0.5481809
APIVersion         : 5.5.2
SignedCertificates : True
SslProtocol        : Tls12
@jonathanmedd jonathanmedd added this to the 2.0.2 milestone Apr 13, 2018
@jonathanmedd
Copy link
Contributor

I've tested this and it's the same behaviour in the vRO client, i.e. if you import the file in your example, it's imported as "application/octet-stream". It appears to be related to the file extension because if you import a file with a *.txt extension, either with the vRO client or PowervRO, it is imported as "text/plain".

There does not appear to be anything within the API to alter this at import time. However, it is possible to alter it via vRO post import - I have documented that previously here: https://www.jonathanmedd.net/2016/10/change-the-mime-type-of-a-vro-resource-element.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants