imagepaste icon indicating copy to clipboard operation
imagepaste copied to clipboard

can I upload copied image to server

Open askme-gpt opened this issue 7 years ago • 1 comments

1、I want to upload copied image to my http server ,so that i can access the photo anywhere ,how can i archive this ? 2、i want to set the extension of file that do not insert image ,such as txt ,what should I do ? thank you !

askme-gpt avatar Jun 27 '18 06:06 askme-gpt

  1. I do not impl upload to server, you could customize it. At ImagePaste.py:paste() function.
	def paste(self):
		if sys.platform != 'win32':
	               # if you using Linux, pls change bin/imageutils.py file. you could add a arg command to upload to http server.
		else: # win32
			ImageFile.LOAD_TRUNCATED_IMAGES = True
			im = ImageGrab.grabclipboard()
			if im:
				abs_fn, rel_fn = self.get_filename()
				im.save(abs_fn,'PNG')	
                                # if in windows, upload to http server
				return rel_fn
  1. If your clipboard data is not image, it call just calls the paste command.

robinchenyu avatar Jul 05 '18 00:07 robinchenyu