I apologize if this has already been covered before.
It does not make sense to me that I can store a media type file in a record but not a text file. I want to belive that I am incorrect but all I can find are aftermarket plugins that allow data file import to a record.
I think I am missing something? I don’t need to view the file from the form and I don’t need to edit it either. I just need a db record to hold drawing files until I need them (preferably the same way I can load pictures).
This seems like a blindingly simple function with the image_media datatype already in place and doing what it does.
Will someone please advise me on way or the other on this issue.
Thanks for your help. Strangely I found that I could import a .doc to the media field and servoy would store it as “image.unknown” If I changed the extension when saving it(out of the field) then I could extract it back out as a .doc.
So the code you gave me handels the naming issue for me, Thanks.
Now I have some checking to do because after importing the file and trying to save the form change I recieve this error…
“com.servoy.j2db.ApplicationException: Cannot save form data”
Do I need to change the field type for non image data?