留言板 留言板

返回

File type extension missing from asset

触发器
File type extension missing from asset
答复
23-9-11 上午8:41
Hi,

I am seeing that when attaching a PDF or ZIP file to a course as an asset, the file downloads as expected.

However if I attach an Office file (.docx, .xlsx, .pptx) the file that appears in my downloads foler does not have a filetype extension. If I manually add the expected extension the file then opens as normal.

Is this the intended behaviour?

Many thanks in advance.
0 (0 票)

RE: File type extension missing from asset
asset
答复
23-9-12 下午12:07 回复Leon R。
Hi Leon,

This appears to be a bug - the file extension should not be removed when you download the file. We have logged a ticket to fix this.

In the meantime, there is a workaround. Please follow these steps:

1. Download the attached html file
2. Open the file using a text editor or anything that edits HTML. Change the href="sample_sheet.xlsx" reference to match your file name (e.g. href="mydocument.docx"). Save your change. 

3. Create a Zip containing both the html and your file. The name of the zip file doesn't matter. 
4. In SmartBuilder, add an asset object and in the Asset property, select the zip file.


5. In the Select File window, type "download.html". Note that the input field border is not visible in dark mode, but you can type into it (We will fix this). Click OK. 

6. Set up your action to open the asset. For example: Button1.onClick > Asset1.open



Let us know if that works for you!
0 (0 票)