One of the requirement for filing a divorce in a foreign country is to be resident (and so have a residency card/permit). It's not applicable for people having a tourist/work/student visa.