vasanth
I'm new here

LocalizableMediaConstraintsException

Dear All,

I am getting the ERROR  while uploading the picture in FS

Java Code

media.getPicture(language).setPicture(resolution, Inputstreamsize, inputstream,

                   filetype);

ERROR :

de.espirit.firstspirit.store.access.mediastore.LocalizableMediaConstraintsException: The filename extension 'null (application/octet-stream)' is not included in the list of supported extensions ([bmp, gif, jpeg, jpg, pbm, pcx, pgm, png, ppm, raw, tif, tiff, wbmp]).

at de.espirit.firstspirit.service.mediamanagement.MediaConstraintsUploadHook.checkFsSupportedPictureExtensions(MediaConstraintsUploadHook.java:159)

at de.espirit.firstspirit.service.mediamanagement.MediaConstraintsUploadHook.checkMediaConstraints(MediaConstraintsUploadHook.java:145)

at de.espirit.firstspirit.service.mediamanagement.MediaConstraintsUploadHook.preProcess(MediaConstraintsUploadHook.java:61)

at de.espirit.firstspirit.server.mediamanagement.UploadHooks.callPreMethod(UploadHooks.java:158)

at de.espirit.firstspirit.server.mediamanagement.UploadHooks.processPreUploadHooks(UploadHooks.java:83)

at de.espirit.firstspirit.store.access.mediastore.PictureImpl.uploadPicture(PictureImpl.java:329)

at de.espirit.firstspirit.store.access.mediastore.PictureImpl.setPicture(PictureImpl.java:198)

Please help to resolve this issue

Labels (1)
Tags (2)
0 Kudos
2 Replies
bIT_sosswald
Returning Responder

Re: LocalizableMediaConstraintsException

Hi Vasanth,

what kind / type of picture you want to upload?

It seems that the parameter "filetype" is not set correctly as mentioned in the error message. "null (application/octet-stream)" is definitely not a valid file type. You have to get the correct file extension like "jpg" or what so ever and pass it in this parameter. That has to be done in your java code depending on how you are getting and processing the picture.

See: Picture (FirstSpirit Access-API)

The allowed file types can be configured in the Servermanager of the corresponding project:

323073_pastedImage_0.png

Best regards

Sandro

0 Kudos
mfinsterbusch
Elite Observer

Re: LocalizableMediaConstraintsException

are you using the fs-access.jar?

If yes, there is a bug in this interface, please use try using the runtime jar instead.

stumbled over the same.

best,

0 Kudos