cconard96 / glpi-screenshot-plugin

Take a screenshot or screen recording directly from GLPI and attach it to a ticket, change or problem
GNU General Public License v2.0
5 stars 0 forks source link

When using the module to record video, a problem was discovered. The problem is supposedly that videos larger than 2 megabytes cannot be attached to the application #46

Closed NazarovRoman closed 1 year ago

NazarovRoman commented 1 year ago

When using the module to record video, a problem was discovered. The problem is supposedly that videos larger than 2 megabytes cannot be attached to the application

I will attach a video of the problem below https://github.com/cconard96/glpi-screenshot-plugin/assets/40058572/00b32f59-9897-4373-8f34-0328f9a32289

NazarovRoman commented 1 year ago

Another problem is that if you delete records from the application, they will still be present on disk in the directory "WEBM".

cconard96 commented 1 year ago

Hello,

This plugin does not do anything except:

  1. Utilize the browser's built-in screenshot and recording functionality to create an image or video file.
  2. Pass that data to GLPI's native functionality to handle uploading documents. The screenshot/recording is attached to the ticket like any other document.

That said, please make sure your GLPI settings allow uploading documents over 2MB as well as your PHP settings (upload_max_filesize and post_max_size). Also, check that "webm" is one of the document types registered and allowed to be uploaded in Setup > Dropdowns > Document Types.

For the deletion issue, there is nothing special about the documents once uploaded. This plugin doesn't need to handle that part. If you are only removing the document from the ticket, you should be aware that you would only be deleting the relationship between the document and the ticket since you can have the same document linked to multiple things. You could delete the document itself manually in Management > Documents, or if you never want a document without a link to a ticket or something else, enable and use the "cleanorphans" Automatic Action that has the "Itemtype" of "Documents". That would periodically run and delete documents without a link.

NazarovRoman commented 1 year ago

Thanks for the full and detailed answer! It helped! You are the best!