How do you upload the file? As the error suggested, It seems that the file is still being used somewhere. You need to make sure that the object that you are trying to use is disposed first before referencing the same object in your code.
Here's an article that talks about how to avoid such exception when it happens:
Vincent Maverick DuranoPosted May 24, 2016, 8:09 AM