Desktop version

Main > Forum > 1C:Enterprise Platform > 1C:Enterprise – Business applications platform > Attachments inside LAN

Forum

Search UsersRules
Attachments inside LAN
#1
Active user
Points:: 0
Joined:: Jul 18, 2012

Hello, everyone!

We have made a file library with large files and would like to manage them through 1C, the question is how to attach files to catalog items without of loading them into infobase? We would like to display a hyperlink which will open that file in a certain program.

Profile
#2
Active user
Points:: 0
Joined:: Nov 1, 2011

Just use a catalog with "FilePath" attribute.

Profile
#3
Active user
Points:: 0
Joined:: Jul 18, 2012

And what to do to fill it with file path and to open file?

Profile
#4
Active user
Points:: 0
Joined:: Nov 1, 2011

Here you can download sample application "Managed Application"
Download

As you can see, catalog "Goods" has PictureFile attribute. You could use it as an example

Profile
#5
Active user
Points:: 0
Joined:: Jul 18, 2012

Thanks, Leksus!

Profile
#6
Active user
Points:: 0
Joined:: Nov 1, 2011

Sorry but it was bad example for you, because in this sample application files are stored in StoredFiles catalog, which has attribute FileData of ValueStorage type  :(
This is not good when you are dealing with large files.
Instead of storing files inside the database it's better to store them on a special storage. In this case you have to store only file path as I mentioned above

Profile
#7
Active user
Points:: 0
Joined:: Jul 18, 2012

Yep, I've got the idea. So I took path from FileDialog and put it in an attribute which is displayed on a form as a field of Label field type and checked Hyperlink checkbox. Then I added the Click event handler as follows:

Code
&AtClient
Procedure FileNameClick(Item, StandardProcessing)
   RunApp(Object.FileName);
   StandardProcessing = False;
EndProcedure

Profile
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)



© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.