Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Can I access attachments of unpublished document? View modes: 
User avatar
Member
Member
mmacarie - 11/21/2013 2:55:14 AM
   
Can I access attachments of unpublished document?
I have a document with a File field. The attachment is accessible using getattachment/<GUID>/details.aspx url but only if the document is published. Otherwise the request returns 404 error code.

I've tried to uncheck 'Page not found for non-published documents' setting but even though the page is accessible the attachment returns the same error code 404.

Is there a way to access attachments of unpublished documents?

User avatar
Kentico Consulting
Kentico Consulting
Kentico_RichardS - 11/21/2013 4:28:24 AM
   
RE:Can I access attachments of unpublished document?
Hi Mihail,

Thank you for your message.

This is not possible with using our getattachment file. You could modify the CMSPages/GetFile.aspx.cs file which is responsible for displaying attachment to display also unpublished files, however this would require some advanced programming skills as I wasnt able to find any simple way of disabling this.

Also what is the purpose of this? This is breaking the workflow. What you could also do is setup permission to some users to given document and they will be able to see even the unpublished ones.

Kind regards,
Richard Sustek

User avatar
Member
Member
mmacarie - 11/21/2013 6:56:38 AM
   
RE:Can I access attachments of unpublished document?
Thank you Richard,

Just what I was looking for. Although it breaks the workflow if fixes my current issue.

Regards,
Mihail