0

I have a question and an issue with FilePond.

I am currently using FilePond in combination with Doka and want to load an initial image, i added the image via. files: [] with an url to my server where the file is located at.

The file load works, except for one thing:

I am using file type validation and if i am loading the initial file using an url the file type will always be text/html, this results in not loading the image and i am not able to change it using doka.

If i add text/html to the file type validation i am not able to use the image preview.

Does someone know if there is a workaround for this?

Sayem
  • 39
  • 4

1 Answers1

0

It sounds like the server you're loading the file from isn't assigning the correct mime-type to the file. Best to make sure it does.

If you can't change that you could load it with fetch, adjust the type property and then add it to FilePond.

Rik
  • 3,328
  • 1
  • 20
  • 23
  • Thanks, i tried to see if it is a mime type issue with the file but the type seems to be correct. I tried using a generic image (https://c.files.bbci.co.uk/957C/production/_111686283_pic1.png) from bbc to test if this image can be loaded, unfortunately it can't be added either. These settings are active: allowFileTypeValidation: true, acceptedFileTypes: ['image/*'] -> all images will result in this error. https://i.ibb.co/mJLbh8p/image.png – Sayem Jan 18 '21 at 11:06