Abstract:
The examples of the present disclosure disclose a method and apparatus for uploading an attachment, relate to the internet technologies, and solve problems in the traditional art that a user device cannot completely show all the content to upload and that some touch screen devices cannot obtain information inputted by the user properly. The method comprises: uploading an attachment uploading interface, the attachment uploading interface including at least one attachment uploading option; determining an attachment to upload when an attachment uploading option is activated; and generating attachment information corresponding to the attachment to upload and displaying the attachment information on a location where the at least one attachment uploading option is displayed.

Description:
CROSS REFERENCE TO RELATED APPLICATIONS 
       [0001]    This application is a continuation application of PCT Patent Application No. PCT/CN2013/088131, entitled “Method and Apparatus for Uploading an Attachment” filed on Nov. 29 2013, which claims priority to Chinese Patent Application No. 201210499226.1, entitled “Method and Apparatus for Uploading an Attachment” filed on Nov. 29, 2012, both of which are incorporated by reference in their entirety. 
     
    
     TECHNICAL FIELD 
       [0002]    The present disclosure relates to internet technologies, and particularly relates to a method and apparatus for uploading an attachment. 
       BACKGROUND 
       [0003]    With wide use of the internet, social network services (SNSs) develop rapidly. A SNS provides an interaction platform for internet users to communicate with each other and make friends with each other. A user can upload information such as text, images, and so on to show himself or share funny things with other users. Since multimedia materials such as images or video files have a relatively direct visual appearance, uploading images to the SNS network gradually becomes a main tendency of the SNS developments. 
         [0004]      FIG. 1  shows an operation interface via which a user device can upload text, images and so on. As shown in  FIG. 1 , text to upload is inputted into a text input area on the operation interface; when an upload from local button on the operation interface is clicked, a local image media library is invoked for the user to select and determine an image to upload, and the image to upload is loaded and displayed in the text input area; or when an upload captured photo button is clicked, a camera of the user device is invoked to take a picture, and after the picture is taken, the taken picture is loaded and displayed in the text input area. 
         [0005]    During implementation of the present disclosure, the inventor finds that following problems may exist in the traditional art: 
         [0006]    Since the space of a user device&#39;s screen is limited, when a user inputs a relatively large amount of text information or when the size of an image to upload is too large, the user device can&#39;t display all the content to upload completely; or for some touch screen devices, when an image to upload is too large, the image may cover the touch screen keyboard area, resulting in that the touch screen devices can&#39;t obtain information inputted by the user properly. 
       SUMMARY 
       [0007]    The examples of the present disclosure provide a method and device for uploading an attachment to solve the problems that a user device can&#39;t completely display all the content to upload and that some touch screen devices can&#39;t obtain information inputted by the user properly. 
         [0008]    An aspect of the present disclosure provides an apparatus for uploading an attachment, including: a loading unit, to load an attachment uploading interface, the attachment uploading interface including at least one attachment uploading option; a determination unit, to determine an attachment to upload when an attachment uploading option is activated; and a display unit, to generate attachment information corresponding to the attachment to upload and display the attachment information on a location where the at least one attachment uploading option is displayed. 
         [0009]    Another aspect of the present disclosure provides a method for uploading an attachment, including: loading an attachment uploading interface, the attachment uploading interface including at least one attachment uploading option; determining an attachment to upload when an attachment uploading option is activated; and generating attachment information corresponding to the attachment to upload and displaying the attachment information on a location where the at least one attachment uploading option is displayed. 
         [0010]    Another aspect of the present disclosure provides an apparatus for uploading an attachment, including: memory; one or more processors; and one or more programs stored in the memory and configured for execution by the one or more processors, the one or more programs including instructions to: load an attachment uploading interface, the attachment uploading interface containing at least one attachment uploading option; determine an attachment to upload when an attachment uploading option is activated; generate attachment information corresponding to the attachment to upload; and display the attachment information on a location where the at least one attachment uploading option is displayed. 
         [0011]    A further aspect of the present disclosure provides a non-transitory computer-readable storage medium comprising a set of instructions for rating reputation of a web site, the set of instructions to direct at least one processor to perform acts of: loading an attachment uploading interface, the attachment uploading interface containing at least one attachment uploading option; determining an attachment to upload when an attachment uploading option is activated; generating attachment information corresponding to the attachment to upload; and displaying the attachment information on a location where the at least one attachment uploading option is displayed. 
         [0012]    Compared to what in the traditional art that attachment information corresponding to an attachment to upload is generally displayed on an area of a text input area or of a touch screen keyboard area, which affects normal use of the text input area or the touch screen keyboard area, for the method and apparatus for uploading an attachment provided by the present disclosure, since the attachment information corresponding to the attachment to upload is displayed on the location where the at least one attachment uploading option is displayed, therefore the attachment information of the present disclosure is prevented from being displayed on the area of the text input area or of the touch screen keyboard area, thus solving the problem in the traditional art that a user device can&#39;t completely display all the content to upload, and that some touch screen devices can&#39;t obtain information inputted by the user properly. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0013]    For a better understanding of the present disclosure, reference should be made to the Detailed Description below, in conjunction with the following drawings in which like reference numerals refer to corresponding parts throughout the figures. 
           [0014]      FIG. 1  shows a schematic diagram of an attachment uploading interface of the traditional art; 
           [0015]      FIG. 2  shows a flowchart of a method for uploading an attachment provided by an example of the present disclosure; 
           [0016]      FIG. 3(   a ) shows a schematic diagram of an attachment uploading interface provided by an example of the present disclosure; 
           [0017]      FIG. 3(   b ) shows another schematic diagram of the attachment uploading interface provided by the example of the present disclosure; 
           [0018]      FIG. 4  shows a flow chart of a method for uploading an attachment provided by another example of the present disclosure; 
           [0019]      FIG. 5  shows a schematic diagram of a structure of an apparatus for uploading an attachment provided by an example of the present disclosure; and 
           [0020]      FIG. 6  shows a schematic diagram of a structure of an apparatus for uploading an attachment provided by another example of the present disclosure; and 
           [0021]      FIG. 7  shows a block diagram illustrating an apparatus for loading an attachment according to an example of the present disclosure. 
       
    
    
     DETAILED DESCRIPTION 
       [0022]    Reference will now be made in detail to examples, which are illustrated in the accompanying drawings. In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure. Also, the figures are illustrations of an example, in which modules or procedures shown in the figures are not necessarily essential for implementing the present disclosure. In other instances, well-known methods, procedures, components, and circuits have not been described in detail so as not to unnecessarily obscure aspects of the examples. 
         [0023]      FIG. 2  shows a flowchart of a method for uploading an attachment provided by an example of the present disclosure. 
         [0024]    As shown in  FIG. 2 , at block  101 , an attachment uploading interface is loaded and the attachment uploading interface includes attachment uploading options. Specifically, the attachment uploading options may be an upload from local option and/or may be an attachment obtaining option. An attachment to upload can be an image file, an audio file, a video file, and so on. However, it is not limited to these. 
         [0025]    For example, if the attachment to upload is an image file, an interface to display the image to upload is shown in  FIG. 3(   a ), where the attachment uploading options include an upload from local option and an upload captured photo option. 
         [0026]    At block  102 , when an attachment uploading option is activated, an attachment to upload is determined. 
         [0027]    For example, if the upload from local option is activated, a local file selection interface will be displayed and the user can select a file from the local file selection interface. The selected local file will be deemed as the attachment to upload. 
         [0028]    As another example, if the above attachment to upload is an image, after the attachment obtaining option is activated, a camera of the electronic device is started, and after the camera captures an image, the image captured by the camera will be used as the attachment to upload. 
         [0029]    Optionally, the local file selection interface can be displayed, and a selected local file is determined as the attachment to upload. For example, after the upload from local option is activated, a local image file stored on the electronic device will be selected to upload. The attachment to upload can be various kinds of forms, e.g., an audio file, a video file, etc., but is not limited to these. 
         [0030]    Optionally, an attachment obtaining program is started and a file is obtained by the attachment obtaining program. The file obtained by the attachment obtaining program is determined as the attachment to upload. The attachment obtaining program can be e.g. starting the above camera, and an image file can be obtained by the camera. Furthermore, the above attachment obtaining program can be starting a video camera, a recorder, etc., but it is not limited to these. 
         [0031]    At block  103 , attachment information corresponding to the attachment to upload is generated, and the attachment information is displayed on a location where the attachment uploading options are displayed. For example, as shown in  FIG. 3(   b ), the attachment information of the image is shown on a location where the upload from local option and the upload captured photo option are displayed. 
         [0032]    Compared to what in the traditional art that attachment information corresponding to an attachment to upload is generally displayed on an area of a text input area or a touch screen keyboard area, which affects normal use of the text input area or the touch screen keyboard area, for the method for uploading an attachment provided by the example of the present disclosure, since the attachment information corresponding to the attachment to upload is displayed on the location where the attachment uploading options are displayed, therefore, the attachment information of the present disclosure is prevented from being displayed on the area of the text input area or the touch screen keyboard area, thus solving the problem in the traditional art that a user device can&#39;t completely show all the content to upload, and that some touch screen devices can&#39;t obtain information inputted by the user properly. 
         [0033]      FIG. 4  shows a flow chart of a method for uploading an attachment according to another example of the present disclosure. 
         [0034]    As shown in  FIG. 4 , at block  201 , an attachment uploading interface is loaded, the attachment uploading interface including attachment uploading options. And then, block  202  or  203  is executed. Specifically, the attachment uploading options may be an upload from local option or may be an attachment obtaining option. An attachment to upload can be an image file, an audio file, a video file, and so on. However, it should not be limited to these. 
         [0035]    For example, if the attachment to upload is an image file, then an interface to display the image to upload is shown in  FIG. 3(   a ), where the attachment uploading options include an upload from local option and an upload captured photo option. 
         [0036]    At block  202 , when an attachment uploading option is activated, a local file selection interface is shown, and a selected local file is determined as the attachment to upload. Then block  206  is executed. 
         [0037]    Specifically, here the attachment uploading option can be an upload from local option. And after the upload from local option is activated, the local file selection interface is displayed, and the selected local file is determined as the attachment to upload. 
         [0038]    For example, when the attachment to upload is an image file, after the upload from local option is clicked, a local image media library selection interface is displayed, and after the user selects an image from the image media library, the image selected by the user is used as the attachment to upload. 
         [0039]    At block  203 , when the attachment uploading option is activated, an attachment obtaining program is started. Specifically, here the attachment uploading option is an attachment obtaining option. For example, when the attachment to upload is an image file, after the attachment obtaining option is activated, the camera of the electronic device is started, and after the camera captures an image, the image captured by the camera will be used as the attachment to upload. 
         [0040]    At block  204 , a file is obtained by the attachment obtaining program. Specifically, the camera of the electronic device can be used to obtain an image file, or the video camera of the electronic device can be used to obtain a video file, or a recorder of the electronic device can be used to obtain an audio file, and so on, and the present disclosure should not be limited to these. 
         [0041]    At block  205 , the image obtained by the attachment obtaining program is determined as the attachment to upload. And then the block  206  is executed. 
         [0042]    At block  206 , attachment information corresponding to the attachment to upload is generated, and the attachment information is displayed on a location where the attachment uploading options are displayed. 
         [0043]    If the attachment is an image file, the attachment information contains an image name, an image format, and/or an image thumbnail. Or if the attachment is an audio file, the attachment information contains an audio name, an audio format, and/or audio play time. Or if the attachment is a video file, the attachment information contains a video name, a video format, a video thumbnail, and/or video play time. 
         [0044]    Specifically, the size of the area where the attachment information is displayed can be configured, and the attachment information can be displayed on a location where the attachment uploading options are displayed, in which the size of the display area of the attachment information is larger, smaller or equal to the size of the location where the attachment uploading options are displayed. 
         [0045]    For example, when the attachment information needs to be displayed more comprehensively, the size of the area where the attachment information is displayed will increase accordingly as needs. 
         [0046]    To be specific, when a thumbnail contained in the attachment information is to be shown, it can be shown by being slidden in an animated way from an edge of the electronic device screen to the location where the attachment uploading options are displayed. Specifically, the obtained thumbnail of the attachment to upload is shown in an Image Control, and the X coordinate property, TranslateX, and the Y coordinate property, TranslateY, of the Image Control are changed by using an animation function DoubleAnimation (an animation function used to realize smooth movements of Controls). Horizontal changes of the Image Control can be realized by changing a value of the X coordinate property thereof, TranslateX, and in a same way, vertical changes of the Image Control can be realized by changing a value of the Y coordinate property thereof, TranslateY. In this way, the Image Control can be slid from the edge of the screen to the location where the attachment uploading options are displayed. 
         [0047]    At block  207 , when it is detected that the area where the attachment information is displayed is selected and moved, if the movement thereof is larger than a predefined value, then the attachment information is deleted and the attachment uploading options are shown again. 
         [0048]    Specifically, an animation function DoubleAnimation is used to change the X coordinate property, TranslateX, and the Y coordinate property, TranslateY, to slide the Image Control from the location where the attachment uploading options are displayed to the edge of the screen so as to form a deletion animation. 
         [0049]    Compared to what in the traditional art that attachment information corresponding to an attachment to upload is generally displayed on an area of a text input area or of a touch screen keyboard area, which affects normal use of the text input area or the touch screen keyboard area, for the method for uploading an attachment provided by another example of the present disclosure, since the attachment information corresponding to the attachment to upload is displayed on the location where the attachment uploading options are displayed, therefore the attachment information of the present disclosure is prevented from being displayed on the area of the text input area or of the touch screen keyboard area, thus solving the problem in the traditional art that some user devices can&#39;t completely show all the content to upload, and that some touch screen devices can&#39;t obtain information inputted by the user properly. 
         [0050]      FIG. 5  shows a schematic diagram of a structure of an apparatus for uploading an attachment provided by an example of the present disclosure. As shown in  FIG. 5 , the apparatus for uploading an attachment provided by an example of the present disclosure includes: an uploading unit  31 , a determination unit  32 , and a display unit  33 . 
         [0051]    The uploading unit  31  is adapted to load an attachment uploading interface, the attachment uploading interface including the attachment uploading options. For detailed implementation thereof, please refer to what shown in the block  101  of  FIG. 2 , which will not be elaborated herein. 
         [0052]    The determination unit  32  is adapted to determine an attachment to upload when an attachment uploading option is activated. For detailed implementation thereof, please refer to what shown in the block  102  of  FIG. 2 , which will not be elaborated herein. 
         [0053]    The display unit  33  is adapted to generate attachment information corresponding to the attachment to upload and display the attachment information on the location where the attachment uploading options are displayed. For detailed implementation thereof, please refer to what shown in the block  103  of  FIG. 2 , which will not be elaborated herein. 
         [0054]    To be specific, as shown in  FIG. 6 , the determination unit  32  is adapted to, when the attachment uploading option is activated, display a local file selection interface, and determine a selected local file as the attachment to upload. For detailed implementation thereof, please refer to what shown in the block  202  of  FIG. 4 , which will not be elaborated herein. 
         [0055]    Specifically, as shown in  FIG. 6 , the determination unit  32  is specifically adapted to, when the attachment uploading option is activated, start an attachment obtaining program. For detailed implementation thereof, please refer to the content shown in the block  203  of  FIG. 4 , which will not be elaborated herein. 
         [0056]    A file obtained by the attachment obtaining program is determined as the attachment to upload. For detailed implementation thereof, please refer to what shown in the block  205  of  FIG. 4 , which will not be elaborated herein. 
         [0057]    Specifically, as shown in  FIG. 6 , the apparatus further includes a deletion unit  34 . And the deletion unit  34  is adapted to, when it is detected that the display area of the attachment information is selected and moved, if the movement thereof is larger than the predefined value, the attachment information is deleted and the attachment uploading options will be shown again. For detailed implementation thereof, please refer to what shown in block  207  of  FIG. 4 , which will not be elaborated herein. 
         [0058]    Further,  FIG. 6  shows a schematic diagram of a structure of an apparatus for uploading an attachment provided by another example of the present disclosure. As shown in  FIG. 6 , the display unit  33  includes a configuration module  331  and a display module  332 . 
         [0059]    The configuration module  331  is adapted to configure the size of the area where the attachment information is displayed. And the display module  332  is adapted to display the attachment information on the location where the attachment uploading options are displayed. The size of the area where the attachment information is displayed is larger, smaller or equal to the size of the location where the attachment uploading options are displayed. 
         [0060]    Compared to what in the traditional art that attachment information corresponding to an attachment to upload is generally displayed on an area of a text input area or a touch screen keyboard area, which affects normal use of the text input area or the touch screen keyboard area, for the apparatus for uploading an attachment provided by the present disclosure, since the attachment information corresponding to the attachment to upload is displayed on the location where the attachment uploading options are displayed, therefore, the attachment information of the present disclosure is prevented from being displayed on the area of the text input area or of the touch screen keyboard area, thus solving the problem in the traditional art that a user device can&#39;t completely display all the content to upload, and that some touch screen devices can&#39;t obtain information inputted by the user properly. 
         [0061]      FIG. 7  shows a block diagram illustrating an apparatus for loading an attachment according to an example of the present disclosure. The apparatus includes a memory  70 , one or more processors  71 , and one or more programs  72  stored in the memory and configured for execution by the one or more processors  71 . The one or more programs  72  include instructions to execute the operations of blocks  101  to  103 . And specifically, the instructions are used to execute the operations of blocks  201  to  207 . 
         [0062]    An example of the present disclosure also discloses a non-transitory computer-readable storage medium including a set of instructions for loading an attachment. The set of instructions are used to direct at least one processor to perform acts in the blocks  101  to  103 . And specifically, the instructions are used to direct the at least one processor to perform acts in the blocks  201  to  207 . 
         [0063]    The foregoing description, for purpose of explanation, has been described with reference to specific examples. However, the illustrative discussions above are not intended to be exhaustive or to limit the present disclosure to the precise forms disclosed. Many modifications and variations are possible in view of the above teachings. The examples were chosen and described in order to best explain the principles of the present disclosure and its practical applications, to thereby enable others skilled in the art to best utilize the present disclosure and various examples with various modifications as are suited to the particular use contemplated. 
         [0064]    The above examples may be implemented by hardware, software, firmware, or a combination thereof. For example the various methods, processes and functional modules described herein may be implemented by a processor (the term processor is to be interpreted broadly to include a CPU, processing unit/module, ASIC, logic module, or programmable gate array, etc.). The processes, methods and functional modules may all be performed by a single processor or split between several processors; reference in this disclosure or the claims to a ‘processor’ should thus be interpreted to mean ‘one or more processors’. The processes, methods and functional modules are implemented as machine readable instructions executable by one or more processors, hardware logic circuitry of the one or more processors or a combination thereof. The modules, if mentioned in the aforesaid examples, may be combined into one module or further divided into a plurality of sub-modules. Further, the examples disclosed herein may be implemented in the form of a software product. The computer software product is stored in a non-transitory storage medium and comprises a plurality of instructions for making an electronic device implement the method recited in the examples of the present disclosure.