Hi Team,
We are using the File Upload component from the forge in one of the applications. The Security team reported an issue that the file path is getting exposed in the browser network tab after file uploading. So please help me with this and suggest how we can hide the path.
File Upload Component Url:
https://www.outsystems.com/forge/component-overview/352/file-upload
Hi @Shailendra Shrivastava,
You can achieve it by making change in component
Go to fileuploadHandler screen-->Prepartion -->JsonResponse
change it from
JsonResponse +
"{
""name"":""" + Replace(EscapeDataString(GetRequestFiles.RequestFiles.Current.RequestFile.FileName),"\","\\") + """,
""size"":" + GetRequestFiles.RequestFiles.Current.RequestFile.FileSize + ",
""url"":""" + Replace(Path_GetTemporaryFileName.FileName,"\","\\") + """,
""thumbnail_url"":"""",
""delete_url"":"""",
""delete_type"":"""",
""type"":""" + Replace(GetRequestFiles.RequestFiles.Current.RequestFile.FileType,"/","//") + """
},"
TO
JsonResponse + "{ ""name"":""" + Replace(EscapeDataString(GetRequestFiles.RequestFiles.Current.RequestFile.FileName),"\","\\") + """, ""size"":" + GetRequestFiles.RequestFiles.Current.RequestFile.FileSize + ", ""thumbnail_url"":"""", ""delete_url"":"""", ""delete_type"":"""", ""type"":""" + Replace(GetRequestFiles.RequestFiles.Current.RequestFile.FileType,"/","//") + """},"
Now in network tab there is no information about the url like this.
Thanks,
Gaurav Rawat