I found an example that ST gives for STM32F4 Discovery it's called FW_upgrade. Its a bootloader that uses the USB FS in OTG mode and it upgrades the firmware from a flash disk. BUT..this example uses the old libraries not the one given by cube projects. Even the names of the functions it uses are different.
Are there any new examples using cube ? i only found an app note UM1720