CancelReason - File Upload Dialogue

Vote:
 

Hi!

I am capturing the CreatingContent event on file upload and cancelling it if the folder being uploaded to is not a certain folder. This works fine, however when setting CancelAction to true, I also set the CancelReason, but the only thing showing in the status column of the file upload dialogue is the word "failed".

Is there any way I could display the CancelReason in the file upload dialogue so the user knows why the upload failed?

(EPiServer 9)

Thanks in advance,

/Daniel

#143786
Feb 01, 2016 10:42
Vote:
 

Hello Daniel

I believe this is by design to keep the UI consistent. The error message you set is displayed when the user hovers over the error message. You can see an example of this in my blog post (last image on page):

http://www.david-tec.com/2015/07/restricting-the-total-number-of-items-in-an-episerver-media-folder/

David

#143792
Edited, Feb 01, 2016 12:39
Vote:
 

Excellent! Thanks David!

Can´t believe I didn´t try hovering the failed notice. This way we can output the title text by using pure css (we already had a custom css file loaded in edit mode).

If someone else is facing the same issue, you´ll need something along the lines of:

.dgrid-column-status.field-status.epi-failedStatus:after {
    content: ": " attr(title);
}
#143810
Feb 01, 2016 15:46
Vote:
 

No problem Daniel, glad I could help!

Thanks for sharing your css solution to displaying the message too. its gone into my "to keep" list :)

#143813
Feb 01, 2016 16:11
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.