What does "Invalid file type chosen for conversion" mean? - docusignapi

A call to the Docusign API we've been using for a while (POST to /envelopes) has started returning an error sporadically:
status_code: 400
{
"errorCode": "FORMAT_CONVERSION_ERROR_INVALID_FILE_TYPE",
"message": "Invalid file type chosen for conversion."
}
What does this mean?

That should be returned when you're attempting to upload an invalid file type via the API.
What filetype were you attempting to upload? Does your filetype and contents match?
Supported File Types
DocuSign supports the following file types:
DOCUMENT .as, .asl, .asp, .doc, .docm, .docx, .dot, .dotm, .dotx, .htm, .html, .pdf, .pdx, .rtf, .txt, .wpd, .wps, .wpt
DRAWING .dwg, .dxf, .emz, .svg, .svgz, .vdx, .vsd, .vss, .vst IMAGE .bmp, .cdr, .dcx, .gif, .ico, .jpg, .jpeg, .pct, .pic, .png,
.rgb, .sam, .tga, .tif, .tiff, .wpg
PRESENTATION .dps, .dpt, .pot, .potx, .pps, .ppt, .pptm, .pptx
SPREADSHEET .csv, .et, .ett, .xls, .xlsx, .xlt
Note: DocuSign does not support macro-enabled files. To send a macro-enabled file through DocuSign, you must first convert it to PDF
format.
File size limitations
Along with the file format, DocuSign has file size limitations for
your file uploads:
MAXIMUM FILE SIZE 25 MB
RECOMMENDED SIZE 5 MB
For best performance, DocuSign recommends restricting your file
uploads to no more than 5 MB.
Source - DocuSign List of Supported File Types

Related

Steganography with Microsoft Word - DOCX

I write a application hide a of string within a .docx file.
A Docx file comprises of a collection of XML files that are contained inside a ZIP archive. So, My program treat that file like a zip file and hide secret string in it.
After research, I found a way to insert data to ZIP archive.
A Secret String is injected after a file section right before the 1st central directory header. After that, a pointer in an end of central directory record is updated to compensate the shift of the central directory header.
My output docx file work fine with typical file archivers (7-zip, WinRAR, File Roller, &c) or file managers (Windows Explorer).
But when I open my output docx file with Microsoft Word it said:
Here is link for input and output file
What step did I wrong or missing?

Losing the .txt extension of .txt.gz file after saving a python requests response as .gz

I have a list of HTTP URLs which return file content and I have saved those in a file. I don't know which URL will return what file content type. One of the URLs, when manually loaded on browser, downloads a .txt.gz file. However when I check for the content type of the request response it is application/x-gzip, and the file signature is 1f8b08 indicating a .gz file. When I save this file as .gz, the .txt extension of internal file is lost. And a file without any extension is present in the saved .gz file.
Is there any way to know what the file type of the file compressed inside the .gz or .zip file is from the requests content? Or to know that the file is a .txt.gz file?
In the image above we can see that the file inside 12345.gz does not have a .txt extension when I write the response content to a .gz file. But when I load the URL manually, the internal file has a .txt extension.
After reading the response content:
I am able to identify that the file signature is for .gz file but is there any way to know that file inside .gz archive is .txt or other type of file.
Here is an example of .gz file i get by manually downloading and saving the response.

How to upload a csv file using Swagger Open API 3.0?

I have given the following specification for csv file upload:-
requestBody:
description: .csv file
content:
application/csv:
schema:
type: string
format: base64
I have also tried different types instead of application/csv, like multipart/form-data, text/csv etc. but none of them show a file upload option on the Swagger UI(also tried changing format to byte, binary, but no luck). The documentation mentions file upload only for images(which works fine).
Is there any way we can get the file upload option for csv or pdf files?
As of April 2020, Swagger UI shows the upload button only for application/octet-stream and image/ media types. There's an open issue to support file upload for other media types as well:
https://github.com/swagger-api/swagger-ui/issues/5636
As a workaround, you can try using application/octet-stream instead of application/csv.

What .xlsx file format is this?

Using an existing SSIS package, I was trying to import .xlsx files we received from a client. I received the error message:
External table is not in the expected format
These files will open in XL
When I use XL (currently XL2010) to Save As... the file without making any changes:
The new file imports just fine
The new file is 330% the size of the original file
When changing .xlsx to .zip and investigating the contents with WinZip:
The original file only has 4 .xml files and a _rels folder (with 2 .rels files):
The new file has the expected .xlsx contents:
Does anyone know what kind of file this could be?
It would be nice to develop my SSIS package to work with these original files, without having to open and re-save each file. There are only 12 files, so if there are no other options, opening/saving each file is not that big of deal...and I could automate it with VBA going forward.
Thanks for any help anyone can provide,
CTB
There are many Excel file formats.
The file you are trying to import may have another excel format but the extension is changed to .xlsx (it could be edited by someone else) , or it could be created with a different Excel version.
There is a Third-Part application called TridNet File Identifier which is an utility designed to identify file types from their binary signatures. you can use it to specify the real extension of the specified file.
Also after a simple search on External table is not in the expected format this error is thrown when the definition (or version) of the excel files supported in the connection string is different from the file selected. Check the connection string used in the excel connection manager. It might help to identify the version of the file.

How to get the content from an uncompressed .docx file by using ifstream.open() and read() methods. office open xml, vc++

I'm trying to build a suffix tree from a .docx file.
So first I unzipped the .docx file and then again created a .docx file with out compressing it. I used ICSharpCode.SharpZipLib.Zip.ZipOutputStream.SetLevel(0) method. Here I used C#.
This uncompressed .docx files can be opened without any error.
For the next step I used vc++. By using ifstream.open ("uncompressed.docx", ios::binary ); method I tried to open the file and store the content in a char array by using ifstream.read ( (char *)T, MAX_LENGTH - 1 ) method. But I could not get the actual content of uncompressed.docx file. When I tried to print the content of the char array(T) it printed some formatting tags rather than printing the actual text content of the uncompressed.docx.
I could not figure out what is the actual file that ifstream.open() method opens.It is not the document.xml file.
Please tell me how to get the actual text content from the uncompressed.docx file using VC++.

Resources