Suggestions for File Saving?

Hi Folks - hoping someone will have a few moments to suggest a direction I can follow, for the following requirement.

I need to save files, BMP/GIF/JPG and PDF’s all in a db table. I have the column as an image type in SQL Server and of course I can add a graphic to that field using the standard Web Client to insert a file when displaying it as a media field type. But that only allows for a graphic not a pdf.

I’d be quite happy to add a link in my display table (maybe a hyper-link or something) and show the file in its native app (acrobat for example), but I’m not sure how to save that file in the column and how to then re-show it with the link.

For logistical reasons I don’t want to save the files to the server and there will not be so many it will cause a db size issue.

Cheers

If you create that column via Servoy as a “Media” column it will take care of mapping it to the correct SQL Server column type (in Postgres it’s bytea) and you will be able to store anything binary in that.
For adding a link to your display table use the file plugin to save the file to the client machine or search the forum for “blobloader”.

ngervasi:
If you create that column via Servoy as a “Media” column it will take care of mapping it to the correct SQL Server column type (in Postgres it’s bytea) and you will be able to store anything binary in that.
For adding a link to your display table use the file plugin to save the file to the client machine or search the forum for “blobloader”.

Thanks Nicola - I see the file plugin tools and we use them to store files on the server, but I’m not sure how to save an image or a pdf to a table column - guess I’m missing the obvious?

Kahuna:

ngervasi:
If you create that column via Servoy as a “Media” column it will take care of mapping it to the correct SQL Server column type (in Postgres it’s bytea) and you will be able to store anything binary in that.
For adding a link to your display table use the file plugin to save the file to the client machine or search the forum for “blobloader”.

Thanks Nicola - I see the file plugin tools and we use them to store files on the server, but I’m not sure how to save an image or a pdf to a table column - guess I’m missing the obvious?

Yes ;)
Read the file (this depends from where you read it) and save it to your column by simply:

myMediacolumn = myMediaVar/myBytesArray
databaseManagerSaveData()