xxf:r: optional 2nd parameter with resources instance name
xxf:upload-error: support error type and parameters

This allows knowing if the error is due to a file that is too larte.