A non-transitory computer-readable storage medium storing a program for controlling a computer to execute a control method of a communication apparatus, the method comprising:
- a first determination step of determining whether the communication apparatus holds authentication information for using image sharing services or a relay apparatus, which relays communication between the communication apparatus and a server apparatus providing the image sharing services, holds the authentication information;
- a second determination step of determining, based on a determination result in the first determination step, whether the communication apparatus transmits image data using the image sharing services to the server apparatus or the communication apparatus causes the relay apparatus to transmit the image data to the server apparatus;
- a transmission step of:
- 1) transmitting the image data to the server apparatus as a transmission destination in a case where the second determination step determines that the communication apparatus transmits the image data to the server apparatus;
- and
- 2) transmitting the image data to the relay apparatus as a transmission destination in a case where the second determination step determines that the communication apparatus causes the relay apparatus to transmit the image data to the server apparatus;
- a request step of requesting the relay apparatus to transmit the image data to the server apparatus in a case where the second determination step determines that the communication apparatus causes the relay apparatus to transmit the image data to the server apparatus,
- wherein the request step does not request a transmission of the image data in a case where the second determination step determines that the communication apparatus transmits the image data to the server apparatus.