A non-transitory computer-readable storage medium storing a computer-readable process, the computer-readable process causing a computer to perform a method for controlling an image forming apparatus to which a detachable storage device is connectable, the method comprising:
- reading an original document;
- storing image data generated from the read original document in the storage device which is connected to the image forming apparatus;
- storing, in a storage section provided in the image forming apparatus, image data which is generated from the read original document and is not stored in the storage device because of interrupting storage of the image data in the storage device;
- allowing a user to select whether to use authentication information to store the image data in the storage section in a detachable storage device which is newly connected to the image forming apparatus;
- acquiring authentication information;
- associating the acquired authentication information with the image data stored in the storage section;
- determining, when the user selects to use the authentication information, a detachable storage device is newly connected to the image forming apparatus and authentication information is entered, whether image data associated with the entered authentication information is stored in the storage section;
- storing the image data stored in the storage section in the newly connected storage device when the user selects to user the authentication information and it is determined that the image data associated with the entered authentication information is stored in the storage section;
- and
- storing, when the user does not select to user the authentication information and a detachable storage device is newly connected to the image forming apparatus, the image data stored in the storage section in the newly connected storage device without entering the authentication information.