Ok I figured it out. Don't know why but apparently this wasn't the correct Uri of the file.so in order to get the uri I used this function on the file
Uri uri = Uri.fromFile(file);
and it worked like a charm.Hopefully I'll help anyone that stumbles upon this post