Updated 056 How to use the file field type to upload a file in JCB (markdown)

Amigo 2019-08-06 17:03:51 +02:00
parent bc068fb01c
commit a5327c944b
1 changed files with 1 additions and 1 deletions

@ -59,7 +59,7 @@ What we going to do is we going to var_dump some values just to the screen, when
[00:13:59](https://www.youtube.com/watch?v=o482sK4DxkM&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h13m59s)
You would then want to add some formatting, something like this 'echo <pre>, something like that should do it. Just to add some formatting that it doesn't bulge into one line. I don't need that, I've got XD bug, so it does it for me. We have the data and we see that Banner it's not even the data list, but that's ok. [00:14:43](https://www.youtube.com/watch?v=o482sK4DxkM&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m43s) Just scroll down, you will see we dumped a different set of data and if we scroll a little, we'll see that it has a protected value called jform, name, type, tmp name, error, size, all that information. In the tmp name it has the actual file name 'banner' with its tmp location. It creates a temporal location for the file. It tells us the type is image, a jpeg and also gives us the file name. This is the array that you would want to get hold of and [00:15:29](https://www.youtube.com/watch?v=o482sK4DxkM&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m29s) with whom you would want to make changes, move that image, give it a correct name back, after validating it and doing whatever sanitation is required. Then saving that value back into the banner data position which should be in this first array. It isn't there. But it should be here. So you should just create it.
You would then want to add some formatting, something like this 'echo pre', something like that should do it. Just to add some formatting that it doesn't bulge into one line. I don't need that, I've got XD bug, so it does it for me. We have the data and we see that Banner it's not even the data list, but that's ok. [00:14:43](https://www.youtube.com/watch?v=o482sK4DxkM&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m43s) Just scroll down, you will see we dumped a different set of data and if we scroll a little, we'll see that it has a protected value called jform, name, type, tmp name, error, size, all that information. In the tmp name it has the actual file name 'banner' with its tmp location. It creates a temporal location for the file. It tells us the type is image, a jpeg and also gives us the file name. This is the array that you would want to get hold of and [00:15:29](https://www.youtube.com/watch?v=o482sK4DxkM&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m29s) with whom you would want to make changes, move that image, give it a correct name back, after validating it and doing whatever sanitation is required. Then saving that value back into the banner data position which should be in this first array. It isn't there. But it should be here. So you should just create it.
### Get Function - Jform Where The Data Is