Approved
Last Updated: 21 Feb 2018 11:05 by ADMIN
ADMIN
Rumen
Created on: 21 Feb 2018 11:05
Category: CloudUpload
Type: Bug Report
0
JavaScript error is thrown when the uploaded file name contains an apostrophe ’
When uploading a file to the CloudUpload control with an ’ apostrophe symbol in the name (Examples of the 3C’s.pdf), the control fails with 

Uncaught Error: Sys.ArgumentException: Cannot deserialize. The data does not correspond to valid JSON.
Parameter name: data
    at Function.Error.create (Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_QsfScriptManager_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3ad28568d3-e53e-4706-928f-3765912b66ca%3aea597d4b%3ab25378d2:6)
    at Function.Error.argument (Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_QsfScriptManager_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3ad28568d3-e53e-4706-928f-3765912b66ca%3aea597d4b%3ab25378d2:6)
    at Function.Sys.Serialization.JavaScriptSerializer.deserialize (Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_QsfScriptManager_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3ad28568d3-e53e-4706-928f-3765912b66ca%3aea597d4b%3ab25378d2:6)
    at c.RadCloudUpload.HandlerUploader._successfulResponseStatus (RadCloudUploadScripts.js:477)
    at XMLHttpRequest.p (RadCloudUploadScripts.js:463)

Note, it's not the typical apostrophe. If you replace ’ with a normal ' windows apostrophe, the control uploads the file just fine.

In order to test, create any file on your system using that special character and try to upload that file using the demo application, located:

https://demos.telerik.com/aspnet-ajax/cloud-upload/examples/overview/defaultcs.aspx
0 comments