atanasov_lyuben
I'm new here

FS-Integration: Submitting a file data from a form

Hello,

I am building a small JSP (see "jsp form.png") using FSI, which purpose is to send text data and an image file to FirstSpirit. There is no problem with the text data, as I use the text input field as explained in the documentation and it works perfectly:

<input type="text" class="textfield" name="<fsi:ref value='p.company.phone' />" value="<c:out value='${p.company.phone}'escapeXml='true' />" size="32" maxlength="32">

I couldn't find any information in the documentation about submitting a file data, though. What I try in the moment is:

<input type="file" class="file" name="<fsi:ref value='p.picture' />">

but it does not seem too work (picture field in the DB is defined as an XML type).

Thanks in advance.

Regards,

Lyuben Atanasov

0 Kudos
2 Replies
feddersen
Community Manager

DynamicDatabaseAccess (FSI) doesn't supported files of any kind. Files are not stored within the database, but in the mediastore. So if website users should be able to upload images directly into FirstSpirit, you'll have to implement a:

  1. FirstSpirit Service that is able to upload files/images into the mediastore of a project (and maybe even modify the database entry to reference that file)
  2. a servlet or taglibrary that communicates with that service to upload a file
0 Kudos

I solved the problem, but I invested a lot of time in this issue (which should be sth standard). I think it would be very helpful for the other developers in the comunity, if there is a blog with the complete solution of the problem.

0 Kudos