Hello Zhen,
This is possible using the SaveToDbxl qRules command which allows you to save a file, a set of files, an image or a set of images to a DBXL DocType called QdFile. After your attachment has been submitted as a QdFile document to DAT, qRulesLink and qRulesFilename will be populated with the link and the filename to the image or attachment.
Please see the Appendix section of the qRules User Guide (included when you install qRules) for instructions on how to set this up.
Hope this helps. Please let us know if you encounter any issue.
Thanks!