To fix same problem on my S4 mini I've tried:
Numerous PCs and USB cables
USB debugging (& Stay awake & Unknown sources) checked and unchecked
Unmounted & remounted SD card
Asking the PC to look for new hardware
Removed and re-installed PC drivers
Dial *#7284# or *#0808# and set MTP+ADB USB...