How to use file upload but not write anything to the database

How to use file upload but not write anything to the database

nkitchen66nkitchen66 Posts: 7Questions: 3Answers: 0

I'm trying to use the bubble editor in our site and utilize the feature of having multiple items for editing in the bubble.

In this case, I want to have 4 upload options in which only 2 of the files will have a database field associated with them while the other two files just use the reference point of the parent id.

Right now, I'm struggling with just getting the field to show up right for one of the ones that will not have a database entry. This is the info I have but I'm not certain what to use in the name field as it's wanting a db field. When I left it out, it said it was missing.

Also some help on adding the next file button would be helpful. :)

  if ($('#catalog_school-body-table').length){

        editor2 = new $.fn.dataTable.Editor( {
            ajax: {
                url: "catalog-school.html?school=edit",
                data: function ( d ) {}
            table: "#catalog_school-body-table",
            fields: [  {
                label: "Name",
                name:  "school.name_vc"
            }, {
                label: "School Domain",
                name:  "school.domain_vc"
            }, {
                label: "Signature File:",
                name:  "sigFile",
                type:  "upload",
                display: function ( id ) {
                    return '<img src="'+editor.file( 'images', id )+'/SchoolSignature.png"/>';
                noImageText: 'No Signature found'

            }, {
                label: "Phone<br>Support",
                name:  "school.phone_support"
            }, {


       $('#catalog_school-body-table').on( 'click', 'tbody td:not(:first-child)', function (e) {
            editor2.bubble( this );
        } );

        var table2 = $('#catalog_school-body-table').DataTable({
            "dom": 'Bfrtip',
            "displayLength": 10,
            ajax: "catalog-school.html?school=catalog",
            columns: [
                { data: "school.id_i"},
                { data: "school.name_vc" },
                { data: "school.domain_vc" },
                { defaultContent: "Click for Images" },
                { data: "school.phone_support" },
                { data: "school.email_support" },

Thank you for your assistance.


  • allanallan Posts: 57,300Questions: 1Answers: 9,127 Site admin


    Could you clarify what you are going to be doing with the name and school domain fields here - it isn't quite clear to me what the intention is I'm afraid? Hopefully with a better understanding of the goals I can help to resolve the issue.


  • nkitchen66nkitchen66 Posts: 7Questions: 3Answers: 0

    Our system uses a specific pathing based on the school id which is why I am not storing the filenames in the database. For instance a path location would be /images/102/schoolsignature.png where 102 is the school.id_i

    I went back and decided to start working on the uploads that do have a database entry and it is somewhat working. The fields that have a database value do show the field value in them but won't let me edit them. I'm guessing it's because I haven't done the back end for the webpath in the update yet, but I'm not entirely certain as if the field hasn't been updated yet, does it even call the webpath yet.

    Thank you for your help,

Sign In or Register to comment.