Topic on Project:Support desk

User must select a license on upload page

2
41.223.25.52 (talkcontribs)

Hi there, In the project I am working on I don't want users to be able to upload files using the special:upload page when they have not selected a licence. In the same manner you are restricted to upload certain file types, would it be possible to restrict users from uploading files without choosing a licence? My knowledge in Java Script is limited but I understand php fairly well.

Thank you

Florianschmidtwelzow (talkcontribs)

Hello,

you can try to use the Hooks/UploadForm:BeforeProcessingUploadForm:BeforeProcessing hook]], which is called just before the input data is processed and can abort the upload. Compared with the function SpecialUpload::showRecoverableUploadError you should be able to output a user friendly error message without loosing the input data.

Reply to "User must select a license on upload page"