Recent

Author Topic: Add pictures from clipboard  (Read 1814 times)

duzenko

  • New Member
  • *
  • Posts: 41
Add pictures from clipboard
« on: August 26, 2023, 09:58:40 am »
Hi, can we please get rid of the requirement to add screenshots as attachment files?
It's very inconvenient
Let me know you'd like some technical help with it

440bx

  • Hero Member
  • *****
  • Posts: 4737
Re: Add pictures from clipboard
« Reply #1 on: August 26, 2023, 10:50:40 am »
An attachment is a file that is uploaded to the server (becomes part of the page), the clipboard contents are not a file therefore cannot be attached.

Fulfilling your request would require having the browser save the clipboard contents into a temp file then attach the file.  The attachment would then be shown with the name of the temp file, which is usually a semantically very poor name.
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

duzenko

  • New Member
  • *
  • Posts: 41
Re: Add pictures from clipboard
« Reply #2 on: August 27, 2023, 11:59:12 am »
An attachment is a file that is uploaded to the server (becomes part of the page), the clipboard contents are not a file therefore cannot be attached.

Fulfilling your request would require having the browser save the clipboard contents into a temp file then attach the file.  The attachment would then be shown with the name of the temp file, which is usually a semantically very poor name.
Have you seriously never seen a web page that can paste from clipboard and upload to the server? Stackoverflow? Github? Any image hosting site? Lots of forums that already do this?

PascalDragon

  • Hero Member
  • *****
  • Posts: 5755
  • Compiler Developer
Re: Add pictures from clipboard
« Reply #3 on: August 27, 2023, 12:08:12 pm »
Hi, can we please get rid of the requirement to add screenshots as attachment files?
It's very inconvenient
Let me know you'd like some technical help with it

If there isn't a suitable extension for the forum software in use (SMF) then no, this will not be changed, cause we don't want to maintain custom code for the forum as that will only lead to increased maintainence requirements when updating.

440bx

  • Hero Member
  • *****
  • Posts: 4737
Re: Add pictures from clipboard
« Reply #4 on: August 27, 2023, 12:42:09 pm »
Have you seriously never seen a web page that can paste from clipboard and upload to the server? Stackoverflow? Github? Any image hosting site? Lots of forums that already do this?
I've seen plenty of them but, they all put the data into a file and in the case of this forum the file name is of, at least, some importance therefore, it is _not_ a good idea to have a generated file name in this forum.
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

 

TinyPortal © 2005-2018