WO2016115979A1 - 图片上传方法及装置 - Google Patents
图片上传方法及装置 Download PDFInfo
- Publication number
- WO2016115979A1 WO2016115979A1 PCT/CN2016/070178 CN2016070178W WO2016115979A1 WO 2016115979 A1 WO2016115979 A1 WO 2016115979A1 CN 2016070178 W CN2016070178 W CN 2016070178W WO 2016115979 A1 WO2016115979 A1 WO 2016115979A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- uploading
- image
- picture
- recently cached
- recently
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
Definitions
- the present application relates to the field of Internet technologies, and in particular, to a picture uploading method and apparatus.
- the present application provides a method and device for uploading pictures, which can solve the deficiencies in the related art.
- a method for uploading an image including:
- the image upload function When the image upload function is triggered, the most recently cached image is uploaded to the server.
- a picture uploading apparatus including:
- a pasting unit when detecting a pasting operation occurring in a reserved area in the webpage, acquiring a most recently cached picture in the system clipboard, and pasting the same to the reserved area;
- the uploading unit uploads the most recently cached image to the server when the image uploading function is triggered.
- the application can perform the event monitoring function on the system clipboard, and can copy (or cut, crop, etc.) and paste the image as a selection operation of the image, which helps to simplify the uploading of the image. Process to improve operational efficiency.
- 2A-2D are schematic diagrams of interfaces of uploading pictures in the related art
- FIG. 3 shows a flowchart of a picture uploading method according to an exemplary embodiment of the present application
- FIG. 4 is a flowchart of another image uploading method according to an exemplary embodiment of the present application.
- FIGS. 5-8 are schematic diagrams showing an interface for uploading a picture according to an exemplary embodiment of the present application.
- FIG. 9 is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present application.
- FIG. 10 shows a block diagram of a picture uploading apparatus according to an exemplary embodiment of the present application.
- FIG. 1 is a flowchart of a picture uploading method in the related art. As shown in FIG. 1, the image uploading method includes:
- Step 102 Store the picture to the terminal local.
- step 102 can be omitted for the original picture resource local to the terminal.
- step 104 the picture to be uploaded is selected.
- a control as shown in FIG. 2A is provided on the webpage, and the user can call up the image selection interface shown in FIG. 2B on the webpage by clicking “select file” (or other trigger mode), and select the desired Uploaded image (ie, the image to be uploaded).
- select file or other trigger mode
- the desired Uploaded image ie, the image to be uploaded.
- the user can pass the point. Click the image file you want to use as the image to be uploaded.
- the image to be uploaded can be “1.JPG”.
- step 106 the browser reads the label of the selected picture.
- the selected picture is the picture to be uploaded selected in step 104, such as the above picture "1.JPG", and the picture tag may include information such as file type, data, file name and the like.
- step 108 the selected picture is submitted to the server.
- the user can trigger the browser to upload the picture "1.JPG” by clicking the "Submit” button shown in FIG. 2C.
- the browser creates a FileUpload object for the picture "1.JPG”
- the property of the FileUpload object is filled with the image tag obtained in step 106, and then the browser Submit the data to the server by, for example, a post request.
- Step 110 The receiving server returns data, such as an upload status message, a picture preview page data, and the like.
- step 112 a preview page is generated.
- FIG. 2D shows a preview page for the picture "1.JPG" so that the user can view the picture upload effect.
- the image resource is limited to the local resource. If the network resource is the network resource, it needs to be downloaded and stored locally. Meanwhile, the image selection process is inconvenient, and the user can only be in FIG. 2B. Viewing the image name and other information in the interface shown is easy to cause misoperation, and if the user wants to view the image content, it needs to be separately viewed separately, which is very cumbersome.
- the present application proposes a technical solution for simplifying the image uploading process; for further explanation of the present application, the following embodiments are provided:
- FIG. 3 is a flowchart of a method for uploading a picture according to an exemplary embodiment of the present application. As shown in FIG. 3, the method is applied to a terminal, and may include the following steps:
- Step 302 calling an event monitoring function on the system clipboard.
- the event listener to the system clipboard can be preset by calling the browser.
- the API Application Programming Interface
- the API obtains the event monitoring function for the system clipboard.
- Step 304 When detecting a paste operation occurring in a reserved area in the webpage, acquire a most recently cached picture in the system clipboard, and paste it into the reserved area.
- the browser creates a file uploading object, and performs attribute filling on the file uploading object according to the data and attribute information of the most recently cached picture, thereby uploading the object by uploading the file.
- Upload to the server which implements the upload operation of the most recently buffered image. Because it is a built-in function interface of the browser, there is no security restriction problem, and the information in the system clipboard can be dynamically filled to the file upload object.
- the user can import the uploaded image into the system clipboard in various manners, such as a copy operation on the local image, or a cut operation on the network image.
- the objects in the system clipboard are arranged in chronological order.
- the user can directly paste the recently cached object by issuing a "paste" command.
- the most recently cached object is the most recently cached image.
- the error may be directly prompted to re-acquire the resource of the image to be uploaded; or all the image cache objects in the system clipboard may be obtained and displayed in the webpage. Then, according to the detected user selection operation, the selected picture cache object is used as the most recently cached picture.
- Step 306 Upload the most recently cached picture to the server when the image upload function is triggered.
- the most recently cached picture can be uploaded to the server in a synchronous or asynchronous manner. If the asynchronous upload mode is used, when the image uploading function is triggered, the webpage may be re-rendered according to the most recently cached image, and the uploading effect preview page of the most recently cached image is obtained, and the uploading effect preview is displayed. page.
- the application can perform dynamic attribute filling on the file upload object by calling the event monitoring function of the system clipboard, without security restrictions, and the selected picture is not only It can be a local resource or a network resource, which helps simplify user operations and improve operational efficiency.
- the image resource acquisition method based on the paste form the "view” and “select” operations can be combined, so that the user realizes "what you see is what you get” on the selection operation process of the picture resource, and the operation is simple and intuitive.
- the user can instantly view the image uploading effect without waiting, which helps to improve the user experience.
- FIG. 4 is a flowchart of a method for uploading a picture according to an exemplary embodiment of the present application. As shown in FIG. 4, the method may include the following steps:
- Step 402 calling an event monitoring function on the system clipboard.
- the API when the browser provides an API for the event monitoring function of the system clipboard, the API can be used to obtain an event monitoring function for the system clipboard, and the image is selected based on the system clipboard, and the object attribute. Dynamic operations such as padding meet browser security requirements and are not prohibited by browsers due to security restrictions.
- the corresponding logic of this step can include:
- Step 404 extracting the image to be uploaded to the system clipboard.
- the image to be uploaded may be extracted to the system clipboard in various manners, for example, “copy” or “cut” operations are performed on the image in the local or network resource, and the image may be “cropped”. To intercept any part of the image element.
- step 406 the image to be uploaded is pasted from the system clipboard to the webpage.
- FIG. 5 shows a schematic diagram of a picture uploading interface of an exemplary embodiment.
- a reserved area such as “area 1” and “area 2” may be provided, and the user can perform scraping on the system by selecting a reserved area in which the paste operation is desired to be performed. Paste the picture inside the board.
- the browser needs to create a corresponding FileUpload object for the image to be uploaded, and when the image is pasted into the reserved area, extract the data and attribute information (such as file name, size, etc.) of the image for use in the image. Fill in the properties of the FileUpload object.
- the operation prompt information may be displayed in the reserved area, such as the text “Please select this area and paste the image to be uploaded” as shown in FIG. 5 .
- the webpage may provide two or more reserved areas as shown in FIG. 5, or only a single reserved area may be provided. This application does not limit this.
- the browser can view the most recently cached object in the system clipboard. If the cached object is in the image format, the paste operation is directly completed. The paste effect shown in Figure 6. However, if the cached object is in a non-image format recently, the browser may prompt the user to operate the error and need to reacquire the image; or, as shown in FIG. 7, the cached object in the system clipboard may be displayed on the webpage, and the user Select a picture object to paste into area 1.
- the corresponding logic of this step can include:
- step 408 a preview page is generated and displayed.
- the corresponding logic of this step can include:
- Reader.onload function(e) ⁇ //register onload processing event
- step 410 the picture is submitted to the server.
- step 408 and step 410 can be performed.
- the webpage can be automatically determined as a picture after the user pastes the image into the reserved area.
- the upload function is triggered; or, when the "Submit" button (or other button) in the web page is clicked, it is determined that the image upload function is triggered.
- step 408 when an asynchronous image uploading form is adopted, the browser can locally generate the effect preview page after the image uploading function after the image uploading function is triggered; meanwhile, it can also be “shown in FIG. 8”.
- the form of the progress bar shows the progress of the image upload.
- a synchronous uploading form may also be adopted, that is, after the browser uploads the image to the server, the browser displays the corresponding data after receiving the data returned by the server.
- the image preview page and the "Upload Successful" message may be adopted, that is, after the browser uploads the image to the server, the browser displays the corresponding data after receiving the data returned by the server.
- FIG. 9 shows a schematic structural diagram of an electronic device according to an exemplary embodiment of the present application.
- the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may of course include hardware required for other services.
- the processor reads the corresponding computer program from the non-volatile memory into the memory and then runs to form an image uploading device on the logical level.
- the present application does not exclude other implementation manners, such as a logic device or a combination of software and hardware, etc., that is, the execution body of the following processing flow is not limited to each logical unit, and may be Hardware or logic device.
- the image uploading apparatus may include a calling unit, a pasting unit, and an uploading unit. among them:
- a pasting unit when detecting a pasting operation occurring in a reserved area in the webpage, acquiring a most recently cached picture in the system clipboard, and pasting the same to the reserved area;
- the uploading unit uploads the most recently cached image to the server when the image uploading function is triggered.
- the calling unit is specifically configured to:
- the event monitoring function is invoked through a preset API interface in a browser of the webpage.
- the pasting unit is specifically configured to: create a file uploading object, and perform attribute filling on the file uploading object according to the data and attribute information of the most recently cached image;
- the uploading unit is specifically configured to: upload the file uploading object to the server.
- the pasting unit is specifically configured to:
- the most recently cached object is in a picture format
- the most recently cached object is taken as the most recently cached picture.
- it also includes:
- An object display unit when the most recently cached object is in a non-image format, acquire all image cache objects in the system clipboard, and display the same in the webpage;
- it also includes:
- a rendering unit when the image uploading function is triggered, re-rendering the webpage according to the most recently cached image, to obtain an uploading effect preview page for the most recently cached image;
- a page display unit that displays the upload effect preview page.
- the uploading unit is used to:
- a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
- processors CPUs
- input/output interfaces network interfaces
- memory volatile and non-volatile memory
- the memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory.
- RAM random access memory
- ROM read only memory
- Memory is an example of a computer readable medium.
- Computer readable media includes both permanent and non-persistent, removable and non-removable media.
- Information storage can be implemented by any method or technology.
- Information can be computer readable instructions, data structures, programs Module or other data.
- Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory. (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device.
- computer readable media does not include temporary storage of computer readable media, such as modulated data signals and carrier waves.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
一种图片上传方法及装置,包括:调用对系统剪贴板的事件监听功能(302);当检测到发生于网页中的预留区域内的粘贴操作时,获取所述系统剪贴板内的最近缓存图片,并粘贴至所述预留区域(304);当图片上传功能被触发时,将所述最近缓存图片上传至服务器(306)。通过该技术方案,可以简化图片上传过程。
Description
本申请涉及互联网技术领域,尤其涉及图片上传方法及装置。
在网页浏览的过程中,尤其是社交网页或论坛等类型,往往需要注册并登录相应的用户账号,则用户对账号的资料完善过程中,若希望设置个性化的头像,就需要将头像图片上传至服务器中。当然,除了用户账号的头像上传场景,其他比如发布帖文、社交消息等很多场景也需要上传图片。
发明内容
有鉴于此,本申请提供一种图片上传方法及装置,可以解决相关技术中的不足。
为实现上述目的,本申请提供技术方案如下:
根据本申请的第一方面,提出了一种图片上传方法,包括:
调用对系统剪贴板的事件监听功能;
当检测到发生于网页中的预留区域内的粘贴操作时,获取所述系统剪贴板内的最近缓存图片,并粘贴至所述预留区域;
当图片上传功能被触发时,将所述最近缓存图片上传至服务器。
根据本申请的第二方面,提出了一种图片上传装置,包括:
调用单元,调用对系统剪贴板的事件监听功能;
粘贴单元,当检测到发生于网页中的预留区域内的粘贴操作时,获取所述系统剪贴板内的最近缓存图片,并粘贴至所述预留区域;
上传单元,当图片上传功能被触发时,将所述最近缓存图片上传至服务器。
由以上技术方案可见,本申请通过调用对系统剪贴板的事件监听功能,可以将用户对图片的复制(或剪切、裁剪等)和粘贴作为对图片的选取操作,有助于简化图片的上传过程,提升操作效率。
图1是相关技术中的图片上传方法的流程图;
图2A-2D是相关技术中的上传图片的界面示意图;
图3示出了根据本申请一示例性实施例的一种图片上传方法的流程图;
图4示出了根据本申请一示例性实施例的另一种图片上传方法的流程图;
图5-8示出了根据本申请一示例性实施例的上传图片的界面示意图;
图9示出了根据本申请一示例性实施例的一种电子设备的结构示意图;
图10示出了根据本申请一示例性实施例的一种图片上传装置的框图。
图1是相关技术中的图片上传方法的流程图,如图1所示,该图片上传方法包括:
步骤102,将图片存储至终端本地。
在该步骤中,出于对安全性的考虑,相关技术中要求执行上传操作的图片必须为本地资源,因而用户若希望将任一网页上的图片作为上传图片,必须首先将该图片下载并存储在终端本地,即网络资源转换为本地资源后,才能够执行上传操作。当然,对于终端本地的原有图片资源,可以省去步骤102。
步骤104,选择待上传图片。
在该步骤中,网页上会提供如图2A所示的控件,则用户可以通过点击“选择文件”(或其他触发方式),在网页上调出图2B所示的图片选择界面,并选择希望上传的图片(即待上传图片)。比如图2B所示,在当前路径下包括图片“1.JPG”、“2.JPG”和“3.JPG”等文件,则用户可以通过点
击所需要的图片文件,以作为待上传图片,比如待上传图片可以为“1.JPG”。
步骤106,浏览器读取被选图片的标签。
在该步骤中,被选图片即步骤104中被选中的待上传图片,比如上述的图片“1.JPG”,而图片标签可以包括文件类型、数据、文件名等信息。
步骤108,将被选图片提交至服务器。
在该步骤中,用户可以通过点击图2C所示的“提交”按钮,触发浏览器对图片“1.JPG”的上传操作。具体地,浏览器针对图片“1.JPG”创建一个FileUpload(文件上传)对象,并在“提交”按钮被触发后,利用步骤106获取的图片标签对该FileUpload对象进行属性填充,然后由浏览器通过如post请求将该数据提交至服务器。
步骤110,接收服务器返回数据,比如上传状态消息、图片预览页面数据等。
步骤112,生成预览页面。
在该步骤中,比如图2D示出了对图片“1.JPG”的预览页面,以便于用户查看到图片上传效果。
基于上述操作过程,用户虽然能够完成对图片的上传操作,但图片资源被限制为本地资源,若为网络资源则需要预先下载并存储至本地;同时,图片选择过程不便,用户只能够在图2B所示的界面内查看图片名称等信息,容易导致误操作,而用户若希望查看图片内容,则需要另外单独查看,过程十分繁琐。
因此,本申请为了解决相关技术中的不足,提出了用于简化图片上传过程的技术方案;为对本申请进行进一步说明,提供下列实施例:
图3示出了根据本申请一示例性实施例的一种图片上传方法的流程图,如图3所示,该方法应用于终端,可以包括以下步骤:
步骤302,调用对系统剪贴板的事件监听功能。
在本实施例中,可以通过调用浏览器中预设的对系统剪贴板的事件监听
功能的API(Application Program Interface,应用程序编程接口),获得对系统剪贴板的事件监听功能。
步骤304,当检测到发生于网页中的预留区域内的粘贴操作时,获取所述系统剪贴板内的最近缓存图片,并粘贴至所述预留区域。
在本实施例中,针对最近缓冲图片,浏览器会创建文件上传对象,并根据所述最近缓存图片的数据和属性信息,执行对所述文件上传对象的属性填充,从而通过将该文件上传对象上传至服务器,即实现了对最近缓冲图片的上传操作。由于是浏览器的内置功能接口,因而不存在安全限制问题,可以将系统剪贴板内的信息动态填充至文件上传对象。
在本实施例中,用户可以通过多种方式将上传图片导入系统剪贴板内,比如对本地图片的复制操作,或者对网络图片的剪切操作等。
在本实施例中,系统剪贴板内的对象是按照时间顺序排列的,当最近缓存对象为图片格式时,则用户通过直接发出“粘贴”命令,即可实现对该最近缓存对象的粘贴操作,而该最近缓存对象即最近缓存图片。当最近缓存对象为非图片格式时,可以直接提示错误,要求用户重新获取待上传图片的资源;或者,也可以获取所述系统剪贴板内的所有图片缓存对象,并展示于所述网页内,然后根据检测到的用户选择操作,将被选中的图片缓存对象作为所述最近缓存图片。
步骤306,当图片上传功能被触发时,将所述最近缓存图片上传至服务器。
在本实施例中,可以通过同步或者异步方式,将最近缓存图片上传至服务器。若采用异步上传方式,则当图片上传功能被触发时,可以根据所述最近缓存图片对所述网页进行重新渲染,得到对所述最近缓存图片的上传效果预览网页,并展示所述上传效果预览页面。
由上述实施例可知,本申请通过调用系统剪贴板的事件监听功能,可以对文件上传对象进行动态的属性填充,而不存在安全限制,且被选图片不仅
可以为本地资源,也可以为网络资源,有助于简化用户操作、提升操作效率。同时,通过采用基于粘贴形式的图片资源获取方式,可以将“查看”和“选取”操作相结合,使得用户对图片资源的选择操作过程实现了“所见即所得”,操作简便且直观。此外,通过对上传操作和效果预览的异步处理,使得用户无需等待,便可即时查看图片上传效果,有助于提升用户体验。
图4示出了根据本申请一示例性实施例的一种图片上传方法的流程图,如图4所示,该方法可以包括以下步骤:
步骤402,调用对系统剪贴板的事件监听功能。
在本实施例中,当浏览器提供了对系统剪贴板的事件监听功能的API时,可以通过调用该API来获得对系统剪贴板的事件监听功能,则基于系统剪贴板的图片选取、对象属性填充等动态操作符合浏览器的安全要求,不会由于安全限制而被浏览器禁止采用。
举例而言,当采用JavaScript语言时,该步骤的相应逻辑可以包括:
步骤404,将待上传图片提取至系统剪贴板。
在本实施例中,可以通过多种方式将待上传图片提取至系统剪贴板,比如对本地或网络资源中的图片进行“复制”或“剪切”操作,还可以对图片进行“裁剪”操作来截取任意部分的图片元素。
步骤406,将待上传图片从系统剪贴板粘贴至网页中。
在本实施例中,图5示出了一示例性实施例的图片上传界面示意图。如
图5所示,在用户执行图片上传的网页中,可以提供“区域1”、“区域2”等预留区域,则用户通过选中希望执行粘贴操作的预留区域后,即可执行对系统剪贴板内的图片的粘贴操作。
在本实施例中,浏览器需要为待上传图片创建对应的FileUpload对象,并在图片被粘贴至预留区域时,提取该图片的数据和属性信息(如文件名、大小等),以用于对FileUpload对象进行属性填充。
其中,为了帮助用户顺利完成图片粘贴操作,可以在预留区域内展示操作提示信息,比如图5所示的“请选中本区域,并粘贴需要上传的图片”等文字等。当然,网页可以提供图5所示的2个或更多数量的预留区域,也可以仅提供单个预留区域,本申请并不对此进行限制。
在本实施例中,假定用户选中了区域1,并发出粘贴命令后,浏览器会对系统剪贴板内的最近缓存对象进行类别查看,如果最近缓存对象为图片格式,则直接完成粘贴操作,得到如图6所示的粘贴效果。然而,如果最近缓存对象为非图片格式,则浏览器可以提示用户操作错误,需要重新获取图片;或者,如图7所示,可以将系统剪贴板内的缓存对象展示于网页中,并由用户选择一图片对象,以粘贴至区域1。
举例而言,当采用JavaScript语言时,该步骤的相应逻辑可以包括:
div.addEventLinstener(‘paste’,listener);
步骤408,生成并展示预览页面。
举例而言,当采用JavaScript语言时,该步骤的相应逻辑可以包括:
var file=item.getAsFile(),reader=new FileReader();
reader.onload=function(e){//注册onload处理事件
var img=new Image();
img.src=e.target.result;
步骤410,将图片提交至服务器。
在本实施例中,当用户触发了图片上传功能后,即可执行步骤408和步骤410。其中,网页可以在用户将图片粘贴至预留区域后,自动判定为图片
上传功能被触发;或者,也可以在网页中的“提交”按钮(或其他按钮)被点击时,判定为图片上传功能被触发。
需要说明的是:虽然采用了“步骤408”和“步骤410”的描述方式,但这两个步骤之间并没有必然的关联和先后顺序。比如图8所示,当采用异步的图片上传形式时,浏览器可以在图片上传功能被触发后,立即在本地生成该图片上传后的效果预览页面;同时,也可以通过图8所示的“进度条”的形式,展示出图片上传进度。
当然,本申请并不限制图片上传的形式,即除了采用上述的异步上传形式外,也可以采用同步上传形式,即浏览器在将图片上传服务器后,在接收到服务器返回数据后,才展示相应的图片效果预览页面以及“上传成功”提示信息。
图9示出了根据本申请的一示例性实施例的电子设备的示意结构图。请参考图9,在硬件层面,该电子设备包括处理器、内部总线、网络接口、内存以及非易失性存储器,当然还可能包括其他业务所需要的硬件。处理器从非易失性存储器中读取对应的计算机程序到内存中然后运行,在逻辑层面上形成图片上传装置。当然,除了软件实现方式之外,本申请并不排除其他实现方式,比如逻辑器件抑或软硬件结合的方式等等,也就是说以下处理流程的执行主体并不限定于各个逻辑单元,也可以是硬件或逻辑器件。
请参考图10,在软件实施方式中,该图片上传装置可以包括调用单元、粘贴单元和上传单元。其中:
调用单元,调用对系统剪贴板的事件监听功能;
粘贴单元,当检测到发生于网页中的预留区域内的粘贴操作时,获取所述系统剪贴板内的最近缓存图片,并粘贴至所述预留区域;
上传单元,当图片上传功能被触发时,将所述最近缓存图片上传至服务器。
可选的,所述调用单元具体用于:
通过所述网页的浏览器中预设的API接口,调用所述事件监听功能。
可选的,所述粘贴单元具体用于:创建文件上传对象,并根据所述最近缓存图片的数据和属性信息,执行对所述文件上传对象的属性填充;
所述上传单元具体用于:将所述文件上传对象上传至所述服务器。
可选的,所述粘贴单元具体用于:
获取所述系统剪贴板内的最近缓存对象;
当所述最近缓存对象为图片格式时,将所述最近缓存对象作为所述最近缓存图片。
可选的,还包括:
对象展示单元,当所述最近缓存对象为非图片格式时,获取所述系统剪贴板内的所有图片缓存对象,并展示于所述网页内;
选择单元,根据检测到的用户选择操作,将被选中的图片缓存对象作为所述最近缓存图片。
可选的,还包括:
渲染单元,当所述图片上传功能被触发时,根据所述最近缓存图片对所述网页进行重新渲染,得到对所述最近缓存图片的上传效果预览网页;
页面展示单元,展示所述上传效果预览页面。
可选的,所述上传单元用于:
通过异步方式将所述最近缓存图片上传至所述服务器。
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序
的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。
以上所述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。
Claims (14)
- 一种图片上传方法,其特征在于,包括:调用对系统剪贴板的事件监听功能;当检测到发生于网页中的预留区域内的粘贴操作时,获取所述系统剪贴板内的最近缓存图片,并粘贴至所述预留区域;当图片上传功能被触发时,将所述最近缓存图片上传至服务器。
- 根据权利要求1所述的方法,其特征在于,所述调用对系统剪贴板的事件监听功能,包括:通过所述网页的浏览器中预设的API接口,调用所述事件监听功能。
- 根据权利要求1所述的方法,其特征在于,所述当检测到发生于网页中的预留区域内的粘贴操作时,获取所述系统剪贴板内的最近缓存图片,并粘贴至所述预留区域,包括:创建文件上传对象,并根据所述最近缓存图片的数据和属性信息,执行对所述文件上传对象的属性填充;所述将所述最近缓存图片上传至服务器,包括:将所述文件上传对象上传至所述服务器。
- 根据权利要求1所述的方法,其特征在于,所述当检测到发生于网页中的预留区域内的粘贴操作时,获取所述系统剪贴板内的最近缓存图片,包括:获取所述系统剪贴板内的最近缓存对象;当所述最近缓存对象为图片格式时,将所述最近缓存对象作为所述最近缓存图片。
- 根据权利要求4所述的方法,其特征在于,还包括:当所述最近缓存对象为非图片格式时,获取所述系统剪贴板内的所有图片缓存对象,并展示于所述网页内;根据检测到的用户选择操作,将被选中的图片缓存对象作为所述最近缓存图片。
- 根据权利要求1所述的方法,其特征在于,还包括:当所述图片上传功能被触发时,根据所述最近缓存图片对所述网页进行重新渲染,得到对所述最近缓存图片的上传效果预览网页;展示所述上传效果预览页面。
- 根据权利要求1所述的方法,其特征在于,所述将所述最近缓存图片上传至服务器,包括:通过异步方式将所述最近缓存图片上传至所述服务器。
- 一种图片上传装置,其特征在于,包括:调用单元,调用对系统剪贴板的事件监听功能;粘贴单元,当检测到发生于网页中的预留区域内的粘贴操作时,获取所述系统剪贴板内的最近缓存图片,并粘贴至所述预留区域;上传单元,当图片上传功能被触发时,将所述最近缓存图片上传至服务器。
- 根据权利要求8所述的装置,其特征在于,所述调用单元具体用于:通过所述网页的浏览器中预设的API接口,调用所述事件监听功能。
- 根据权利要求8所述的装置,其特征在于,所述粘贴单元具体用于:创建文件上传对象,并根据所述最近缓存图片的数据和属性信息,执行对所述文件上传对象的属性填充;所述上传单元具体用于:将所述文件上传对象上传至所述服务器。
- 根据权利要求8所述的装置,其特征在于,所述粘贴单元具体用于:获取所述系统剪贴板内的最近缓存对象;当所述最近缓存对象为图片格式时,将所述最近缓存对象作为所述最近缓存图片。
- 根据权利要求11所述的装置,其特征在于,还包括:对象展示单元,当所述最近缓存对象为非图片格式时,获取所述系统剪贴板内的所有图片缓存对象,并展示于所述网页内;选择单元,根据检测到的用户选择操作,将被选中的图片缓存对象作为所述最近缓存图片。
- 根据权利要求8所述的装置,其特征在于,还包括:渲染单元,当所述图片上传功能被触发时,根据所述最近缓存图片对所述网页进行重新渲染,得到对所述最近缓存图片的上传效果预览网页;页面展示单元,展示所述上传效果预览页面。
- 根据权利要求8所述的装置,其特征在于,所述上传单元用于:通过异步方式将所述最近缓存图片上传至所述服务器。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510026409.5A CN105868195A (zh) | 2015-01-19 | 2015-01-19 | 图片上传方法及装置 |
| CN201510026409.5 | 2015-01-19 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2016115979A1 true WO2016115979A1 (zh) | 2016-07-28 |
Family
ID=56416410
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2016/070178 Ceased WO2016115979A1 (zh) | 2015-01-19 | 2016-01-05 | 图片上传方法及装置 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN105868195A (zh) |
| WO (1) | WO2016115979A1 (zh) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN120455448A (zh) * | 2025-06-09 | 2025-08-08 | 福建紫讯信息科技有限公司 | 一种用于浏览器的云文件上传方法、装置、设备和介质 |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108153767A (zh) * | 2016-12-05 | 2018-06-12 | 天脉聚源(北京)科技有限公司 | 一种网页自动上传图片的方法和系统 |
| CN108268528A (zh) * | 2016-12-30 | 2018-07-10 | 华为技术有限公司 | 一种媒体数据的处理方法及终端设备 |
| CN106933975B (zh) * | 2017-02-14 | 2019-09-17 | 北京安云世纪科技有限公司 | 一种媒体文件的显示方法、装置及移动终端 |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20120096368A1 (en) * | 2010-10-14 | 2012-04-19 | Microsoft Corporation | Cloud-based virtual clipboard |
| CN102799372A (zh) * | 2012-06-29 | 2012-11-28 | 北京奇虎科技有限公司 | 一种图片信息的上传方法及上传装置 |
| CN103019814A (zh) * | 2012-11-21 | 2013-04-03 | 北京荣之联科技股份有限公司 | 一种剪切板管理系统及方法 |
| CN103945056A (zh) * | 2014-03-25 | 2014-07-23 | 上海斐讯数据通信技术有限公司 | 一种多媒体数据管理方法及移动终端 |
| CN104268226A (zh) * | 2014-09-27 | 2015-01-07 | 昆明钢铁集团有限责任公司 | 一种基于浏览器的Word图片拷贝上传控件与方法 |
| CN104270426A (zh) * | 2014-09-18 | 2015-01-07 | 百度在线网络技术(北京)有限公司 | 浏览器和通过浏览器上传附件的方法 |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103678704A (zh) * | 2013-12-30 | 2014-03-26 | 北京奇虎科技有限公司 | 一种基于图片信息的识图方法、系统、设备及装置 |
| CN103678706A (zh) * | 2013-12-30 | 2014-03-26 | 北京奇虎科技有限公司 | 一种基于截图信息的识图方法、系统、设备及装置 |
| CN104270425A (zh) * | 2014-09-18 | 2015-01-07 | 百度在线网络技术(北京)有限公司 | 浏览器和通过浏览器向网页邮件发送附件的方法 |
-
2015
- 2015-01-19 CN CN201510026409.5A patent/CN105868195A/zh active Pending
-
2016
- 2016-01-05 WO PCT/CN2016/070178 patent/WO2016115979A1/zh not_active Ceased
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20120096368A1 (en) * | 2010-10-14 | 2012-04-19 | Microsoft Corporation | Cloud-based virtual clipboard |
| CN102799372A (zh) * | 2012-06-29 | 2012-11-28 | 北京奇虎科技有限公司 | 一种图片信息的上传方法及上传装置 |
| CN103019814A (zh) * | 2012-11-21 | 2013-04-03 | 北京荣之联科技股份有限公司 | 一种剪切板管理系统及方法 |
| CN103945056A (zh) * | 2014-03-25 | 2014-07-23 | 上海斐讯数据通信技术有限公司 | 一种多媒体数据管理方法及移动终端 |
| CN104270426A (zh) * | 2014-09-18 | 2015-01-07 | 百度在线网络技术(北京)有限公司 | 浏览器和通过浏览器上传附件的方法 |
| CN104268226A (zh) * | 2014-09-27 | 2015-01-07 | 昆明钢铁集团有限责任公司 | 一种基于浏览器的Word图片拷贝上传控件与方法 |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN120455448A (zh) * | 2025-06-09 | 2025-08-08 | 福建紫讯信息科技有限公司 | 一种用于浏览器的云文件上传方法、装置、设备和介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN105868195A (zh) | 2016-08-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11907642B2 (en) | Enhanced links in curation and collaboration applications | |
| US8819168B2 (en) | Link expansion service | |
| US9977768B2 (en) | System for clipping webpages by traversing a dom, and highlighting a minimum number of words | |
| US20140380142A1 (en) | Capturing website content through capture services | |
| US20140136957A1 (en) | Supporting Scalable Fonts | |
| US9026900B1 (en) | Invisible overlay for dynamic annotation | |
| US20150128017A1 (en) | Enabling interactive screenshots within collaborative applications | |
| TW201443670A (zh) | 提供不計內容格式及類型之內容可存取性的虛擬庫 | |
| US20150058708A1 (en) | Systems and methods of character dialog generation | |
| US11507731B2 (en) | Systems and methods of generating a website | |
| WO2018040913A1 (zh) | 一种界面展示方法及装置 | |
| WO2017211190A1 (zh) | 一种数据处理方法及装置 | |
| CN112015485A (zh) | 页面展示方法、装置、电子设备及存储介质 | |
| CN111382386A (zh) | 一种用于生成网页截图的方法与设备 | |
| CN111666518A (zh) | 一种doi显示方法及装置 | |
| CN105094753A (zh) | 一种线框图的绘制方法、装置和系统 | |
| WO2016115979A1 (zh) | 图片上传方法及装置 | |
| CN110058776A (zh) | Web页面的消息发布方法及装置和电子设备 | |
| CN105630792A (zh) | 一种信息显示、推送方法及装置 | |
| CN106886547A (zh) | 一种脚本生成方法与装置 | |
| CN106844763B (zh) | 一种对互联网媒体文件进行修改式展现的方法及其装置 | |
| CN106330814A (zh) | 展示目标对象的详情信息的方法及装置 | |
| CN105224611A (zh) | 基于浏览器的操作处理方法、装置以及浏览器 | |
| US9953297B2 (en) | Sharing online with granularity | |
| CN102789471A (zh) | 混搭服务器和提供混搭服务的方法 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 16739726 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 16739726 Country of ref document: EP Kind code of ref document: A1 |
