Custom file preview in Bitrix24.Drive
24 June 2022next article
Previewing has become an integral part of many services that store a variety of files. Seeing the contents of a file without opening it is not only convenient, but also necessary, especially when there are many such files. This feature first appeared in computer operating systems. After that, it became clear that in the future this is not just a convenient option, but an urgent need for the interface of any file storage location. However, in the standard version of Bitrix24, the preview is not available everywhere and only for certain file types. Avivi's system upgrade eliminates these inconveniences and makes Bitrix24 even better and more user-friendly.
Standard Bitrix24 preview
The virtual storage Bitrix24.Drive can store completely different files, depending on your needs. The system is able to work with many of their types, but with each in its own way. For example, from 2021, text documents, presentations and spreadsheets are edited directly in Bitrix24 without the help of third-party services. Virtually all types of images are displayed not only when opening files, but also in preview mode. To do this, the user must select the view types "small tile" or "large icons" — in the type "list" there is no such possibility. Files that the system does not interact with are indicated by a common white icon. Therefore, you can have an idea of the contents of such a file only by name or extension.
World practice proves that preview plays an important role for users. This allows you to spend many times less time identifying the contents of the file when viewing the general array of information, faster to find the right files and in general it is logical and modern. Unfortunately, documents, videos and even distributed PDFs in Bitrix24 remained unrecognized. The system simply substitutes icons corresponding to file types, which significantly worsens the level of user perception. Therefore, it is quite justified that Avivi received an order to customize the Bitrix24 box, where the customer wanted to see previews of most of the saved files.
It is quite possible to accomplish this task, because the creators of Bitrix24 have already done something themselves. However, it is almost impossible to predict all possible cases at once, because not all file formats require a preview, and in some it is not required in principle. For example, the fairly popular * .csv file, which can store any tabular information, usually looks like a single long strip of code. Therefore, previewing such a file will not give anything useful.
The customer himself has outlined a list of desired formats, the files of which should be displayed on Bitrix24.Drive with a preview. This includes all office formats (especially presentations that clients work with most often), PDFs, video files, and several image formats that are not processed by Bitrix24.
To perform the task, our specialists customized the disk.folder.list component, which is responsible for displaying files, in particular on Bitrix24.Drive. To do this, special parameters were added and special libraries were connected — separately for each of the required formats. In general, you can repeat this in any on-premise eddition of Bitrix24 and for any file format you need. The main thing is that it already has the necessary library, because it greatly simplifies the process.
Avivi developers have also provided the ability to update previews. To do this, changes were made to the onAfterAddFille and onAfterDeleteFile system events. Therefore, the preview image is generated immediately after uploading it to the virtual disk. It`s clear with single images, for multi-page documents it will be a picture of the first page, and for video — a screenshot of the first frame. However, if changes are made to the file, Bitrix24 will capture and "redraw" the preview. The developers wanted to keep all the tricks of the image creation process a secret.
So another customization from Avivi has made Bitrix24 even better and more convenient for its customers. If you are also interested in seeing a preview of the files in your own Bitrix24.Disk — contact the Avivi team and we will be sure to customize your server version. In addition, we still have many options for custom functionality that complete and improve the system.
Scrum in Bitrix24 became one of the most long-awaited Bitrix24 updates in the departing year of 2021. So what is scrum, and how is it implemented into Bitrix24? And most important — how can it be used for the more efficient completion of the tasks by the team? We talk about that in our article's blog.
Every business owner is always in a constant search for new options of optimization and improvement. If the company is providing diverse customer support, one of the options is to establish an independent and custom-developed ticketing system in the Bitrix24 Portal to improve the customers' requests processing. This article could be useful for you if customer-oriented service provisioning is an important factor.
As the CEO of the Bitrix24 integrator company, I see the CRM implementation processes from both the potential customer’s side and my employees’ side: managers, programmers, and marketing specialists. Relying on multiple cases, as well as personal experience, I want to save time, money and nerves of many who want to work with CRM.
We will reach out to within 10 minutes