Base64ImageCreator
From FacileWiki
Base64ImageCreator
I have created an package that shows how to implement images into an facileforms package.
The php code uses system calls like fopen, mkdir and readfile. Perhaps you have to tell your provider to allow this phpfunctions in your environment.
First of all I had to solve the way how I would store my facileforms related things on the web. I decided to implement an directory structure below com_facileforms that shows in this way:
->com_facileforms
->apps
->myapplication (in my case hsTOOLS)
->uploads
->images
It's simple, in the uploads directory I move the uploaded and converted files and in the images directory I install the images from the db.
Installation
1. Install the package through the facileforms xml-pakage installer
2. go to the menu "Components -> hsTOOLS -> Backend Installation"
3. execute first "Initialize Application". This button executes the piece "hstInstApp" and creates the directory structure with the empty index.html files.
4. You can now install the sample image with "Install Image". This button executes the piece "hstInstImage".
You can see the resulte with the correct image on this form aswell.![]()
Upload Image
1. go to the manue "Components -> hsTOOLS -> Base64ImageConverter"
2. upload your a gif,jpeg or png image file.
The uploaded file is in the uploads directory from hsTOOLS. There you can find the converted image like: imagename.imagetype.base64encoded.txt
To implement the base64 encoded image into facileforms you need to create a peace of code like the hst_img_info in this sample.
I hope this mechanisme also helps other people who are fighting with this greate facileforms component.




