odan / slim4-skeleton

A Slim 4 Skeleton
https://odan.github.io/slim4-skeleton/
MIT License
446 stars 80 forks source link

Filepond with Slim 4 #29

Closed mkraha closed 4 years ago

mkraha commented 4 years ago

Hello Odan,

Could you please consider to write a tutorial for Filepond uploader for Slim 4.

Thank you.

odan commented 4 years ago

Hi @mkraha I had a look at Filepond. Unfortunately there are only very outdated vanilla PHP- and two Laravel-specific adapters. But I couldn't find a PSR-7 compatible adapter yet. Do you know an adapter for Filepond that is compatible with PSR-7?

mkraha commented 4 years ago

Hii @odan We can't able to create one for Slim? and i found this issue rise on Filepond repo.

odan commented 4 years ago

Getting the payload of a PSR-7 request is very easy. I mean a full framework independent PSR-7 implementation of that Filepond "protocol" with all the file handling and so on.

mkraha commented 4 years ago

@odan Sorry! What is that mean? you will able to create one for SLIM or have to ask filepond developer to update php support?

odan commented 4 years ago

I think before we can provide support for Slim, we (or someone else) should first implement a PSR-7 based filepond adapter. We need to find or implement a PSR-7 implementation for filepond.

Someone who needs this filepond adapter could ask a filepond developer to implement it, or we could do it ourselves. https://github.com/pqina/filepond/issues

Are you interested in implementing this filepond adapter? I could also help you with that.

mkraha commented 4 years ago

I am interested but I don't know where to start that. Could please help/guide me to work on that?

odan commented 4 years ago

For the beginning you could read the API documentation: https://pqina.nl/filepond/docs/patterns/api/server/

Then this API must be implemented in PHP based on a PSR-7 request and response object.

For more inspiration you could look here:

PS: I just realized that a special library is not required. I think I write a blog post about this topic.

odan commented 4 years ago

https://odan.github.io/2020/10/06/slim4-filepond.html

mkraha commented 4 years ago

https://odan.github.io/2020/10/06/slim4-filepond.html

Thanks a lot for this!!!!