EldoS | Feel safer!

Software components for data protection, secure storage and transfer

AddAttachment to Simple MIME Message locks file.

Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.
#21935
Posted: 10/11/2012 06:18:09
by Niklas Kjellander (Standard support level)
Joined: 09/30/2008
Posts: 49

Edit: Note that the Message topic really is regarding AttachFile method of TElSimpleMIMEAttachment

When adding an attachment to the TElSimpleMIMEMessage (.Net) and calling the AttachFile method of the attachment, the attached file seems to be opened for booth reading and writing. This blocks others from opening the file for reading. Of course one could set FileShare to ReadWrite when opening it, but allowing others to write to a file whlie reading from it is not always ideal.

Question, is it nescessary for the message/attachment to open the file for booth reading and writing, wouldn't it be enough to open it for reading and allowing others to read from it as well?

Best regards,

Niklas Kjellander
#21936
Posted: 10/11/2012 06:22:52
by Vsevolod Ievgiienko (EldoS Corp.)

Thank you for contacting us.

Could you please clarify how do you add the file as an attachment? You can post your code here.
#21937
Posted: 10/11/2012 06:26:09
by Niklas Kjellander (Standard support level)
Joined: 09/30/2008
Posts: 49

See edits of the original post.
#21938
Posted: 10/11/2012 06:28:49
by Eugene Mayevski (EldoS Corp.)

You probably mean AttachFile method, don't you? Indeed the file is opened exclusively in .NET and Java edition. Ac a workround you can open the file yourself and set ContentStream property of TElFileAttachment to the newly opened stream. BTW in Windows RT this is the only method, as Windows RT doesn't offer functionality to access files.


Sincerely yours
Eugene Mayevski

Reply

Statistics

Topic viewed 434 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!