I don't know any way you can get to the file-add page without a folder_id. It would be a good idea to work backward to the page that was before the one that caused the error. The URL for the file-add page should always look like
file-add?folder_id=123