Take the 2-minute tour ×
Tridion Stack Exchange is a question and answer site for Tridion developers and administrators. It's 100% free, no registration required.

Is there any way to show a warning message to user while uploading large multimedia file in tridion. I want to show Warning popup to the user, once he select the Multimedia items and if it is greator than the size configured.

share|improve this question
    
I agree this is a common requirement. Maybe it would be possible to make the MM Link field read-only, and implement your own custom url popup to upload the MM comp. You would essentially be replacing the Tridion uploader. And, could then use HTML 5 APIs, etc as Bart suggests. –  robrtc Apr 15 at 9:20
add comment

2 Answers 2

Although it is possible to write a handler for the component save event, this would probably be too late. A better approach would be to write a GUI extension that checks the size of the file when the user selects it.

share|improve this answer
    
with a UI extension you will still need to upload the file, unless you use something like jQuery in combination with the HTML5 File Api specification, see stackoverflow.com/questions/1601455/… since by default JavaScript cannot access the filesystem. –  Bart Koopman Apr 15 at 8:12
add comment

You can write an event that checks the size of the multimedia component on save.

Then throw a message to the event system ?

share|improve this answer
    
This still requires you to upload the complete file, and through the event system you can't show warnings, only errors which means you cannot continue with the large file afterwards (it has already been discarded as your event handler has thrown an exception and the save event has been cancelled). –  Bart Koopman Apr 15 at 8:16
    
If we throw exception then current item would not be save. my objective is only to warn user with an message. –  Adarsh Kumar Apr 23 at 11:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.