Uploading Business Central Base App.xlf results in “Failed to extract the contents of the uploaded file.” - azure-cognitive-services

I try to upload the System App.xlf file from English into German (by Business Central 18), but everytime I upload the file, I receive an error that says "Failed to extract the contents of the uploaded file." after 2-3 minutes. Both files are written in xliff version 1.2.
I can't figure out, why file is not processed. Some more information would be useful. Is this error thrown cause of special character?

The Base Application could have some missing -tags in the -tags, which leads to the error. You can use an xlst-File to delete tags with missing. This will delete the -tags with an empty -tag too.

Related

readRDS from url

I saved a dataset in a RDS file on onedrive and made it shareable link. Now, if I use that link to read the file, I got an error.
readRDS(url("https://1drv.ms/u/s!Am3aUTxhPMS8iM4pqe5fUZbiA4m9rw"))
#> Error in readRDS(url("https://1drv.ms/u/s!Am3aUTxhPMS8iM4pqe5fUZbiA4m9rw")): unknown input format
On the other hand, if I download the file from the browser, I copy the link address and I use that one...that works.
Unfortunately, the link address obtained in that way is available only for a limited time (it doesn't work permanently).
I know googledrive and rdrop2 and so I have some workarounds,
but still...I don't understand the logic behind this.
Any help?

Ask in a web form for the path of a file accessed from a user's computer

In a web form (aspx) I want to ask the user for the path of a file that needs to be used by one of our team.
At first it was a simple textbox but a lot of people send us wrong path (copy/paste seemed too hard for them).
So I tried to use an input file to be sure the path exists but noticed that the file is then send with the form. As the files can weight hundreds of Mb that was not acceptable.
Then I found a way with Jquery to use the input file to get the path of the file without sending it : it works fine on IE but Chrome translate the path in "fakepath". I understand that it is for security reasons.
So I am again looking for a solution, working on all browser, to get from the user the path of a file (with a specific extension) without him being able to write a wrong path.
I hope someone will have the brillant idea I am unable to find :-).
How about receiving only a few kilobytes of the file data from stream instead of the whole file to ensure the path points to a valid file.

Create custom file extension and assign registry setting

I'm missing something here, or this isn't possible...
My real goal is to eliminate the "do you want to open or save" message on excel files linked from a LOCAL INTRANET SITE ONLY. I was NOT able to limit this to the local intranet, and using regedit could only remove the message from every excel file downloaded from who knows where.
It was suggested that I create a new file extension, and do the same regedit and we'd just name our custom excel files with a different extension. Ok, trying that out, I created a new key called .sxls in HKEY_CLASSES_ROOT which has two string values (Default) REG_SZ STER.XLS.8 and Content Type REG_SZ application/vnd.ms-excel. It would in all respects be an .xls file, but with a different extension. I then went into HKEY_CURRENT_USER->SOFTWARE->Microsoft->Windows->Shell->AttachementExecute->{002DF01etc} and added a binary STER.XLS.8
Not only was the "do you want to download or" message not suppressed, excel said filename.sxls is in a different format than specified by the file extension.
So, help me out... either to limit the registry setting in AttachmentExecute to 1) a new file type, or 2) just files downloaded from local intranet, or 3) eliminate through the asp.net web app.
Thanks, John

Get file path & filename with asp:FileUpload, don't want file... just path and name

I am developing a .NET intranet site which will enable the user to see a list of files (file details stored in DB) and link to the actual PDF/XML/XLS and open it... kind of like a table of contents for the network.
During data entry, the user enters various data about a document, then browses to the file on the network and selects it using the asp:FileUpload. The codebehind then saves the network path to the DB. There is alot of overhead here because i'm sending the file to the server but never use it.
Everything has been working fine until someone tries to use a large PDF file then I get the dreaded MAXIMUM REQUEST LENGTH EXCEEDED error... So I'm trying to find a solution here... I do not need the actual file.. just the path and filename.
I know not all browsers send the full path but our systems have older browsers so everything is working fine now, but will probably break soon.. which is another reason to find a different solution.
I've looked into Javascript to pull the path but that won't work...
Any other ideas? Other ways to just grab the path and filename? (besides manually typing it in to a Text field)
Thanks,
Todd.
This may help too
How to get the full path of a file from asp: file upload?
string filename = Path.GetFileName(FileUpload1.FileName);//file name
string path= Server.MapPath(filename);//path

ZIP file download tries to download page

just putting this out there to see if anyone has any good off-the-cuff suggestions.
I have a web page with a button that triggers the download of a PDF file. When I run this page up in development from within VS I get the file coming back for download as expected, however since moving my web site to a staaging environment it is now yielding a very different result: When I click the download button I instead get an error and a message which seems to indicate that the call actually attempted to download the raw ASPX page rather than any ZIP file.
As this works so painlessly in my development environment, I'm assuming this must be down to environmental/configurational differences. Has anybody come across this before and if so could you inform me of the error of my ways?
Many thanks in advance
Ian
Could the aspx file be the actual zipfile ? Have you tried downloading it and open as zip?
Does the server allow for aspx to execute, eg mime-settings ?
Maybe this helps Filename and mime problems - ASP.NET Download file (C#)
Or look here How to retrieve and download server files (File.Exists and URL)

Resources