imagepaste
imagepaste copied to clipboard
can I upload copied image to server
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 !
- 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
- If your clipboard data is not image, it call just calls the
pastecommand.