How can you make a CSS file in Oracle Apex?

If you want to make a CSS file to kind of style sheets to hold that style information well then what I would do when I upload that file one of my shared components as work static workspace files I would upload the file and here I would probably something like styles or CSS right and so then to reference that file it would be workspace images / CSS / high salary CSS or something like that all right so it’s just a way to kind of organize your files typically the three major ones are going to be images CSS and script or scripts and so images are going to hold images CSS hold style sheets and then scripts are typically going to hold JavaScript and it’s also not uncommon for if you want to include like a separate library that you make kind of a vendor or libraries folder where then you put all of me like if you like to use the underscore JavaScript framework or you like to use a different version of jQuery or you want to use the bootstrap CSS and JavaScript or whatever it is like this.


You put that under vendor or libraries I hope that was more helpful than harmful hey Mike there in the there in our room all your clothes are in there, so that makes sense so if you want to fix that excuse me one second I’m sorry about that at what you would do is I would probably delete that file you don’t have I don’t believe you have to because it does technically reside in a different directory and so I would probably make the new file leave the old one try to switch everything over and then delete the old one is that that makes sense so that and then that way at least when you delete that file its I guess minimal impact I’m sure there’s going to be some references that you didn’t catch, but that would probably be my workflow for that okay all right so was everyone able to get their logo set up raise your hand if you’re all done great okay wonderful.

So that’s one type of file but we’re going to go ahead and oh I guess one thing that I do want to add at this bottom bullet that is new with Apex five previously if you wanted to move an image from one with your application from one database to another you had to explicitly make a script to do that so you’d have to go and you go into like supporting objects and create an installation script and there’s a special task layer that says create the installation script for images the apex team realized that that whole process was a huge nuisance and you generally always wanted to try to move your images with your application and so now on apex five images even if their workspace images automatically get moved with your application when you can when you export and go to import into test or production, so that’s really cool now the other thing that we’re going to look at and we can actually do this together because well it makes sense.

I want to talk about it first and then we’ll implement it together and handling user files there are two different real approaches to this the declarative process is super easy to set up and that’s actually what we’re going to do today and there’s actually a procedural process which will all we can talk about it’s also fairly straightforward to set up and it’s more customizable and flexible for you to implement and use either way even if you’re using declarative or procedural you need to create a table that has the following pieces of information so in addition to just storing a blob which is you know a file you need to store the mime type that’s basically the type of file is it an image is it a text file is it a Word document what is this basically you’re kind of telling you when they file gets downloaded you’re telling the operating system or whatever is true or whatever’s trying to interact this file hey I’m this type of file.

So go ahead and and handle me the way that you would you would handle this type of time now the final name obviously makes sense in the last two or that are kind of that are optional but always useful that is last modified and character set generally you’re not changing the character set and the last modified is something that’s auto-populated so you don’t really have to worry about that so what does a table look like would be handling files well it would look something like this let’s go ahead and if you want to run this script with me you can module 12 sample code pink cuts should be opening there we go so here’s what an as the script would look like here we have an ID right your primary key to identify a file now we have the mime type the name character set contents and the last modified date so in addition to just storing the blob or the actual file you have all this other supporting information that helps describe the file and it’s equally important as the content of the file itself okay.


And you can see here we’re just populating we just populate we’re creating a trigger to populate the ID for us let’s go ahead and run this in our instance so we’re gonna head on over to sequel workshop and you can just go to sequel commands and into three separate statements you can run them individually so I’ll just select this first part to paste it over here and run ok, so my table was created at my second part run right sequence was created and lastly here I have my trigger okay what is it saying or let me make you presenter missing or invalid auction I got it wonderful so go ahead and finish up the other three scripts and I’ll give you a second that gets that squared away all right so now that we have a table and we’re going to need to interact with that table right we’re going to need to be able to report on that table to list what columns are there and we’re going to need to provide a forum to upload information for that table and we’ll look at that in just it in just a second.

So we’re going to talk about kind of how you would create that, so the declarative blob support is awesome very it’s it does a perfect job but it requires a little fine-tuning in other words it doesn’t ever really work out of the box it sets everything up in kind of really nice way and you just have to you have to set up a couple of different properties after the fact so when we’ll look at that so quite simply all you have to do is create a forum and report combo on the table that has your blog and all your other supporting fields and what’s going to happen is the form is going to have a file browse item.

Leave a Comment