XPages file upload control renames docx and xlsx files - xpages

if i try to upload a file with the default XPages file upload control and save the document everything works with images like jpgs or psd but if you try to upload a docx oder xslx file the server renames it like ATT7ASLO.zip. In the download control the name is displayed correct.
Is there any solution to prevent this?

I think You need to add these file types to the web\file identification section in the name and adressbok. Because docx and xlxs is actually zip files with another mime type.
http://dontpanic82.blogspot.se/2009/06/serving-correct-mime-types-for-office.html
http://www-01.ibm.com/support/docview.wss?uid=swg21412063

Related

How to process *.doc and *.docx file structure with docx.js?

I'm working on a sort of project where I need to be able to modify *.doc and *.docx documents. Working with docx.js, a powerful Node.js tool for generating docx files, is pretty much clear to me, save for how to make it possible to read a document (template file) to be able to generate a dynamic docx file in the output, putting some dynamic data into the loaded template file and then saving it on the server.
Thanks for any clarity on that.

Acumatica - Attachments File Extension Filter

Good Day!
I am uploading some files in form as attachments and I am trying to filter the uploaded file extensions. But I am not getting the exact solution for this.
Is there any way to filter the extensions of the files being uploaded in file attachments?
Thank you so much for the help.
If you mean blocking file upload based on the extension you can do so in File Upload Preference Screen (SM202550):
If you mean the filter for the native open file dialog. It seems hardcoded for a handful of common web files and I don't think it can be changed easily.
If you mean the file upload dialog grid, unlike most grids in the system it is not filterable through the column headers:
Maybe the Search in Files page (SM202520) is what you're looking for. You can search files based on extension here:

How to attach pdf embedded in excel in outlook email with vba

I have created an embedded pdf with the insert> object > create from file> browse > display as icon function in excel.
I would like to then use the embedded pdf as an attachment for my outlook email using vba code. I have tried to use the .Attachment.Add code but it seems to fail to detech an embedded object.
Could anyone advise a correct code? Thanks!
Get the file from the source?
I don't understand why you would need to embed the.PDF object in the workbook, if you're going to be emailing it separately anyhow...
Regardless, you could just grab the actual/original .PDF to attach a copy to the email, directly from the same location from where it was embedded. (If it's not there, what happened to it?)
Another option:
As soon as you right-click the embedded object, Excel 2016 "gets ready" for you to open it by extracting it to your local temp folder. (I'm unsure whether this applies to previous versions.)
Therefore, you could programmatically right-click the embedded icon, and then check the temp folder located at the path that you'll find stored in Environ("temp"). One or more copies of your file will be located there (and it should be the 'newest' PDF).
Yet another option:
Excel's XLSM file is simply a compressed ZIP file, if you change the extension. You could programmatically make a copy of the file, changing it's extension to .ZIP.
Embedded object are stored as .BIN files within the ZIP file in the xl\embeddings\ folder. It would have to be extracted and then renamed back to a PDF. Note that this method is a little flakey and won't work with all PDF's.
More Information:
VBA Express : Save embedded PDF file as a separate PDf file
How-to-Geek : How to Extract Images, Text, and Embedded Files from Office Documents

Detect correct file extension for OpenXmls?

If we have been provided only the XMLs of the document (in input stream, unzipped manner, or in a byte array), can we detect the file extension via parsing XMLs? My motive is to know what particular node in which XML determines that this is DOCX, PPTX, or XLSX file?
I unzipped the documents and tried to dig and found this -
In \docProps\app.xml, application node defines it -
<Application>Microsoft Excel</Application> for Excel,
<Application>Microsoft Office PowerPoint</Application> for PowerPoint, and
<Application>Microsoft Office Word</Application> for Word.

append content to existing file in zip file without unziping

I have a requirement that, I have one zip file that contains lots of xml files and I want to append some extra content( xml tags) to some existing xml file in the zip without unzipping it. Could you please tell me the way?

Resources