Pike v8.1 release 6

Method MIME.Message()->get_filename()


Method get_filename

string get_filename()

Description

This method tries to find a suitable filename should you want to save the body data to disk.

It will examine the filename attribute of the Content-Disposition header, and failing that the name attribute of the Content-Type header. If neither attribute is set, the method returns 0.

Note

An interactive application should always query the user for the actual filename to use. This method may provide a reasonable default though.