In an experience builder, I need to allow users to upload an Excel file for further processing in a notebook published as a Custom web tool.
I created a notebook, configured the input parameters with a "file" type, declared it in the notebook code and published it.
In Experience Builder, I configured the analysis widget to use the published Custom web tool.
However, when configuring the Analysis widget, the checkbox "Allow local file upload" was disabled in the input parameter for the file.
I discovered that I could edit the json service file for the web tool (webtoolService.json) using ArcGIS Assistant and allow uploads with
"capabilities": "Uploads".
I can now enable the "Allow local file upload" option in the widget and I can click on the "upload" button then choose a local file to upload from my computer (small 1kb csv file). But when I do, I get the error:
"Error performing upload operation, file size or type not supported for this service"
What am I missing? I swear I could do this operation like 4-5 weeks ago when exploring the functionalities of notebooks and analysis widget.
@PatricePineaultWSP Thanks for reaching out. Some questions:
1. What version of ExB are you using?
2. What type of the file you are trying to upload?
3. Can you check your web tool service's admin point see its allowing file types and max file size.
Such as "https://domainname/server/admin/services/Tooname.GPServer"
Hi,
CVS and XLSX are supported to be upload as long as your gp service allow to do so.
You have to check with the gp service on server admin side, such as. Please contact your server admin maybe to help verify the supported type for the gp service you are using.
Hi Wei Ying,
I'm trying to do a similar thing from a WebTool published from an ArcGIS Online Notebook. However, the services directory seems to be disabled for the WebTools published from online notebooks. Is this a permission issue or is it disabled across the board? Is there any way to enable local file uploads to a Webtool?
Currently this is a showstopper for a customer who is planning to move their entire GIS operation from ArcGIS Enterprise to ArcGIS Online. A common workflow in many of their domains is allowing users to upload project files (Excel, CSV, images, CAD files) to a GP service that process them and adds the results to a company wide repository (hosted feature layers, image mosaics, oriented imagery layer, etc).
I've updated webtoolService.json with entries for capabilities, maxUploadFileSize and allowedUploadFileTypes
{
"currentVersion": 11.4,
"cimVersion": "2.9.0",
"serviceDescription": "uplolad excel",
"executionType": "esriExecutionTypeAsynchronous",
"resultMapServerName": "",
"maximumRecords": 1000,
"capabilities": "Uploads",
"maxUploadFileSize": 2000,
"allowedUploadFileTypes": "xlsx,xls",
"tasks": [
"Upload_Excel"
],
"serviceUrl": null,
"timeoutInMinutes": 15
}
So allow local file upload is now enabled in Experience Builder
But I'm getting this error when selecting a small .xlsx from my local machine
Am I missing something?