Updated 056 How to use the file field type to upload a file in JCB (markdown)
parent
bc068fb01c
commit
a5327c944b
@ -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)
|
[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
|
### Get Function - Jform Where The Data Is
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user