Use stat() instead of g_file_test() to detect other types of errors, such as "permission denied".
Attach a file by drag & drop or click to upload