The file browses items going to let you pick a file from your computer and then gets going to go ahead and upload that and now the question then becomes where does that file go there’s actually a special table called apex files and that’s where all your files get uploaded to in other words when there’s an HTTP request that has a file associated to it apex just says oh wait here let me put you into this apex files table and then you can select it and work with it out of that table the download and view option in other words what you see in the report and basically you’re going to get a little download link because the there’s nothing you can really do with the club content itself and so all it really selects is the length but it also just aliases it as a download you’re going to see just a download link so we’ll look at that and this will make more sense here just as lame so we’re going to go ahead and now we’re going to go ahead and just do the second workshop together.
So let’s go ahead head on into your application and let’s go ahead and make a new page go ahead and say create a page and just as we would with any other table we’re going to make a form and we’re going to pick that first option form on the table with report it just so happens that the table that we’re about to pick has a blog column and we do not want interactive so go ahead and change the implementation to classic and we can call this user files okay standard template nothing special here so we just called it user files and then it’s going to ask us well what table do you want to make this on and so we’re going to find our user repository or user uploaded files there we go it just so happens that this has a blog column on it now let’s go ahead make a new navigation entry and we’ll call it user files that are fine and we’re pretty much going to accept all the defaults except that we want to make sure that we change the primary key identifier.
We don’t want to use row ID you want to we want to use ID whenever it prompts us for that let’s say next yeah we’ll show everything in the report that’s fine we’ll use the yellow Edit pencil that’s fine we can just accept all the defaults here that’s fine I think this next page is where it’s going to ask us for ID we go so we’re going to say we don’t want to use row ID you actually want to use our own ID okay not that that’s like absolutely crucial but because you have the ID you might as well use it existing trigger sure remember we executed those three statements one for the table 1 for the sequence and the next to last one was to actually create the trigger which will link to the sequence to the table kind of quick question is anyone using Oracle 12c have you heard of or do you know of identity columns okay so what I would encourage you to do and is in 12 see you no longer have to make primary key triggers in other words you can make your ID be a and dent and an identity column.
Now behind the scenes, it’s going to make a sequence and trigger like it’s going to function literally the same except and it will not it plays nice with bulk operations so if you do any bulk inserts or anything like that and it’s going to that sequence is going to be leveraged kind of in that bulk operations not going to suddenly make your full cooperation a row by row or a slow by slow operation so in 12c leverage identity columns for primary keys let’s go ahead and say I’m going to shuttle every item over here you want to see everything on our forum and we’re going to allow insert update delete that’s fine and create alright so what do we get here well we should have a rapport with nothing in it so let’s go ahead and run our page and some of you might have to log in at the event run your application yet let’s go ahead and then login if you haven’t done so and then you should be looking at this page and so far it looks as expected right we have an empty report.
Let’s go ahead and create a new file you don’t need to enter any information in any of these fields so don’t enter anything all we’re going to do is pick a file and see what happens so let’s just go ahead and grab this skill builders logo and say create what happens it uploads the file as part of the HTTP request I don’t get file mime type name I don’t get anything here and when I click download something kind of silly should happen it just it’s just it’s just called download and if I try to open this file it doesn’t know how to open it’s just not right, so if did this happen to everyone else hey Kathy um okay let me share let me share your screen oh so you have everything created on the same page and that can work I mean it’s truth be told it’s not going to hurt us that much um just you’re just going to have one page and for the example I think everything it’s its really going to be fine um but um I don’t know what that setting is off the top of my head but we can circle back and look at it.
But I don’t think you’re in a place where it’s going to it’s really going to impact the workshop as far as just kind of connecting some of the dots here now when you click on when you click on you could you can choose for a file you can browse for a file and click on create and then it creates that empty record and then if you click Edit on one of those files, okay so it is going to hurt us so I don’t know what happened here lets um let’s go ahead and let’s create a new page let’s get and you can do so yeah perfect wonderful next to a forum on the table with report and change go ahead and change the implementation to classic perfect next page 18 so you should be able to pick yet perfect files too oh yeah probably good idea everything fine you know so it is on page 19 is the person was 18 now these ones is 19-page mode is normal yep and of course it takes a second.
When it reads this metadata I’m sorry this is something that I’m trying to have fixed with our instance ID existing trigger and just for clarification even if you have if you did make this as an identity column you would still pick existing triggered when you click existing trigger basically all you’re saying is don’t try to populate the ID on my application my database figure yeah so if 18 and 19 perfect, so that should if that makes one page I’ll be very surprised and I don’t know really what the opportunity was to change that other than unless you may you picked like modal dialogue option or something I guess the only way that maybe that could have happened but still that doesn’t really make sense to me use your files to perfect their you should be able to click edit this should take you to going to click Edit and it should take you to go ahead and delete this file now delete perfect awesome go ahead delete that second file because that’s what the next step is so I’m perfect okay alright.
So this file here is very clearly useless to us it doesn’t work something’s very wrong we don’t have the right metadata it just is not right let’s go ahead and delete this ok so the file’s been cleared up but let’s go back and we need to investigate that form and see what went wrong so go ahead and click on create and we’re going to go ahead and edit this page.