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

Support gif, bmp, xls, xlsx and pdf @ Write-RSFolderContent & Write-RsCatalogItem #233

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

ClaudioESSilva
Copy link
Contributor

Fixes
#214 (includes the changes on #215 that seems to have stood still)
#218
#221

Changes proposed in this pull request:

  • Make possible to upload new file extensions. Namely: gif, bmp, xls, xlsx and pdf

NOTE: new Pester tests included

How to test this code:

  • Try to upload a folder with at least one file of the mentioned types

Has been tested on (remove any that don't apply):

  • Powershell 5.1
  • Windows 10
  • SQL Server 2016 and above

@ClaudioESSilva
Copy link
Contributor Author

Hi @jtarquino ,

Can you, please, take a look at why .xlsx is yielding error?
SoapException: System.Web.Services.Protocols.SoapException: Uploading or saving files with .xlsx extension is not allowed. Contact your administrator if you have any questions. ---> Microsoft.ReportingServices.Diagnostics.ResourceFileFormatNotAllowedException: Uploading or saving files with .xlsx extension is not allowed. Contact your administrator if you have any questions.

I'm able to do it on my local instances (2016 SSRS & 2017 PBIRS).

Thanks!

@jtarquino
Copy link
Member

jtarquino commented Jun 9, 2019 via email

@ClaudioESSilva
Copy link
Contributor Author

Thanks @jtarquino
If I understood correctly, since the Jan 2019 release the extensions were trimmed for the ones in the documentation, but I see that is configurable.
The error seems to be on the SSRS (SOAP) and not on PBIRS (REST) , is this also configurable on SSRS?
Can you configure here on the repository installation script?

@jtarquino
Copy link
Member

jtarquino commented Jun 9, 2019 via email

@ClaudioESSilva
Copy link
Contributor Author

Cool!
Then I will wait for the changes so we can double check that all tests pass and we can merge it!
Thanks for your help.

@jtarquino
Copy link
Member

I added the config but there is a chance the service isn't ready for receiving it so I would recommend to add it to the test setup , check out

$newSettings = New-Object PSCustomObject -Property @{"PropertyValues" = @( @{"@odata.type"="#Model.Property"; "Name" = "AllowedResourceExtensionsForUpload"; "Value" = "*,*.xml,*.xsd,*.xsl,*.png,*.gif,*.jpg,*.tif,*.jpeg,*.tiff,*.bmp,*.pdf,*.svg,*.rtf,*.txt,*.doc,*.docx,*.pps,*.ppt,*.pptx,*.xlsx"})}

@ClaudioESSilva
Copy link
Contributor Author

@jtarquino can you help?
Thanks

@jtarquino
Copy link
Member

sure , as I mentioned earlier the file format wasn't applying always (added retries so now you can rely on it)

@ClaudioESSilva
Copy link
Contributor Author

Thanks @jtarquino. It is still failing 😞

@jtarquino
Copy link
Member

The db tests are probably the cause as they set the new database

I would add the setting of the allowed files to the tests that now require it (mostly to keep every test self contained), those tests are Write-RsFolderContent, Out-RsFolderContent, Write-RsCatalogItem etc

@kavishshaikh1
Copy link

Will it possible to also add .xlsm extensions to it?

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

Successfully merging this pull request may close these issues.

3 participants