Hi all,
I am getting 403 error while trying access the below file
I used below code to add & retrieve file
UploadedFile uploadedFile = MultipleUploadFileManager.GetUploadedFile(fileName, contextId);
if (uploadedFile == null)
{
throw new NotFoundException(CSExceptionType.FileNotFound, null, "", fileName);
}
attachment = new Attachment(fileName, uploadedFile.ContentType, uploadedFile.ContentLength)
{
ApplicationId = ApplicationId,
ApplicationType = (ApplicationType)100,
ContentId = Id,
IsRemote = false,
DateCreated = DateTimeUtil.CurrentUtcTime
};
using (Stream inputStream = uploadedFile.InputStream)
{
attachmentService.Add(attachment, inputStream, true);
}
Services.Get<IAttachmentDataProvider>().PopulateAttachmentFromIDataRecord(dataReader);
Globals.FullPath(attachment.Url);
Kindly help me out in this