Hello!
I need to customize the "Add Data widget" so that the ".prj" file is required, in addition to ".dbf", ".shp" and ".shx". The widget already displays a message when one of these last three files is missing from the ".zip" file. I can not find where I can make this customization, so I can not display the message to the user in the Portuguese language of Brazil instead of English.
Thanks for any help.
Gilberto.
Solved! Go to Solution.
Gilberto,
You will not be able to add that requirement as what sets the requirements and returns the errors is your Portals sharing/rest/content/features web service.
Hello
Momentarily, the solution I found to translate the missing file error message into English was to use a replace, as I did not find this information in any language file in the application. Below is the code changed in the file "widgets \ AddData \ search \ AddFromFilePane.js", at line 410, as follows:
message: error.message.replace("Invalid Shapefile", "Não será possível importar o shapefile").replace("missing dbf file", "arquivo dbf ausente ou inválido").replace("missing shp file", "arquivo shp ausente ou inválido").replace("missing shx file", "arquivo shx ausente ou inválido") //error.message
Gilberto,
You will not be able to add that requirement as what sets the requirements and returns the errors is your Portals sharing/rest/content/features web service.
You can limit the file types that the add data widget allows (as you were asking about in the other thread) though.
In the widgets\AddData\search\AddFromFilePane.js just remove the unwanted type from the SHAPETYPE_ICONS object.
Hello Robert!
Thanks for your return. Actually I was debugging, and I realized that I can not even include ".prj" as required, because in the code I saw the share service that performs this task.
As for limiting the types of files to import, I'd already done that, just like you mentioned. Thanks a lot for the help.
Hug,
Gilberto.