DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Files with the pptx extension are downloaded as .zip from an Azure Storage container.

Sort:
You are not authorized to post a reply.





New Around Here





    Hello everyone,

    I hope you are well. I'm using the Azure Storage provider, enabled the built-in Azure Storage connector, and then connected to an Azure blog storage location. Once the files are synchronized, when I go to download the files from my DNN site or with the URL provided by the FileManager, the pptx files are downloaded as .zip, if I change the .zip extension to that downloaded file and put pptx it opens good. Here I share some additional observations and results I got during testing and research.

    Using the DNN UI to upload the files doesn't happen. This way it is created correctly, in the Azure Storage container in the Content Type column add the correct one for the pptx files, application/vnd.openxmlformats-officedocument.presentationml.presentation. Now when I upload it with another tool in my case I used Azure Storage Explorer it is saved as application/zip.
    While files with other extensions, like pdf or xlsx, keep the correct content type. I ran into a related issue on Stack Overflow that involves XLSX files in Azure Blob Storage being downloaded as .zip files. You can find the discussion here: Stack Overflow Discussion. What they manage here is the solution of the problem in the code.

    It seems that the problem is centered around PPTX files and how Azure Storage handles their content type. There may be a specific setting or property within Azure Storage that is affecting the mapping of content types for PPTX files. Or is it an Azure Storage Explorer configuration problem.

    Thank you for taking the time to read this topic. Your help means a lot and I look forward to learning from your experiences.

    Sincerely,
    Alejandro






    Growing Member





      This is a behavior of Azure Blob Storage if the content type is not set properly on upload.  This can happen, often times with uploads via Azure Storage Manager.

      You can fix the individual files by modifying the content type and setting it properly in Azure Storage Explorer.

      The linked workaround "sort of" works, however, it isn't a great solution as it requires you always to download the file and THEN serve it to the user.  The DNN Azure Storage provider is designed to serve the content FROM Azure storage, and not be an intermediate as it negates any gain of using storage.

      My suggestion would be to modify the values in the storage account to have the proper content types.

      Mitchel Sellers
      Technology Advisory Group Leader
      CEO @ IowaComputerGurus, Inc. a DNN & .NET Solutions Provider
      Technical Blog: MitchelSellers.com





      Senior Member





        Posted By Mitchel Sellers on 8/29/2023 10:41 AM

        This is a behavior of Azure Blob Storage if the content type is not set properly on upload.  This can happen, often times with uploads via Azure Storage Manager.

        You can fix the individual files by modifying the content type and setting it properly in Azure Storage Explorer.

        The linked workaround "sort of" works, however, it isn't a great solution as it requires you always to download the file and THEN serve it to the user.  The DNN Azure Storage provider is designed to serve the content FROM Azure storage, and not be an intermediate as it negates any gain of using storage.

        My suggestion would be to modify the values in the storage account to have the proper content types.

        Thanks for your response, Mitch!  

        This makes me think that this wouldn't be the best way to work with files/folders that would need to be secured, then.  Is that correct?  If it is correct, then we should use what we've been using then. 

         

        You are not authorized to post a reply.

        These Forums are dedicated to the discussion of DNN Platform.

        For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

        1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
        2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
        3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
        4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
        5. No Flaming or Trolling.
        6. No Profanity, Racism, or Prejudice.
        7. Site Moderators have the final word on approving / removing a thread or post or comment.
        8. English language posting only, please.

        Would you like to help us?

        Awesome! Simply post in the forums using the link below and we'll get you started.

        Get Involved