Select to view content in your preferred language

Citizen Service Request �?? Increasing the Maximum File Size of Attachments

840
1
11-07-2013 12:00 PM
JoshVan_Kylen
Regular Contributor
I�??ve updated the httpRuntime maxRequestLength value in the web.config but during my test I still get the file size error message thrown from the SubmitIssueDetails function of utilis.js

Where else is the maximum file size indicated that this function is comparing against?  What else do I need to change to increase the maximum file size before this error message is thrown.

Here is what I believe is the relevant code from the SubmitIssueDetails function.
if (dojo.byId('txtFileName').value != "") {
                    map.getLayer(serviceRequestLayerId).addAttachment(addResults[0].objectId, dojo.byId('formFileUplaod'), function (sucess) {
                        ShowServiceRequestDetails(mapPoint, serviceRequestGraphic.attributes);
                        HideProgressIndicator();
                        ResetRequestFields();
                        HideCreateRequestContainer();
                    }, function (err) {
                        HideProgressIndicator();
                        alert(dojo.string.substitute(messages.getElementsByTagName("fileSize")[0].childNodes[0].nodeValue, [addResults[0].objectId]));

                    });

                } else {
                    ShowServiceRequestDetails(mapPoint, serviceRequestGraphic.attributes);
                    HideProgressIndicator();
                    ResetRequestFields();
                    HideCreateRequestContainer();
                }
0 Kudos
1 Reply
JoshVan_Kylen
Regular Contributor
Upon further investigation the issue is not in the SubmitIssueDetails function, but instead with the service.  We tested the service in ArcGIS.com and could not upload a 4.12 MB file.   Which is interesting since the default maxRequestLength is 4MB. 
While I have the maxRequestLength of the application�??s web.config set to 50MB I did not have a maxRequestLength value set in the service�??s web.config.  Setting the maxRequestLength value in the service�??s web.config appears to have resolved this issue. 

However, I still can�??t get a full 50MB file uploaded.  I think the largest file I�??ve gotten to upload so far is closer to 30 MB.
0 Kudos