<!--views/admin/upload.ejs-->
<link href="/styles/admin/upload.css" rel="stylesheet"></link>

    <div class='Upload'>
        <% if(data.fileUrl){ %>
        <form action='/admin/upload' method='post' enctype="multipart/form-data">
            <input type='file' name='uploadFile' required />
            <input type='text' value='<%= data.fileUrl %>' 
                placeholder='តំណរភ្ជាប់ឯ​កសារ​នៅ​លើ Server' />
            <input type='submit' value='បញ្ជូន​ទិន្នន័យ' />
        </form>
        <% delete data.fileUrl %>
        <% }else{ %>
        <form action='/admin/upload' method='post' enctype="multipart/form-data">
            <input type='file' name='uploadFile' required />
            <input type='text' placeholder='តំណរភ្ជាប់ឯ​កសារ​នៅ​លើ Server' />
            <input type='submit' value='បញ្ជូន​ទិន្នន័យ' />
        </form>
        <% } %>
    </div>

 

/* static/styles/admin/upload.css */
.Upload form{
    display: grid;
    grid-template-columns: 50%;
    grid-gap: 3px;
}

.Upload form input{
    font: var(--body-font);
    padding: 2px 5px;
}

.Upload form input[type="file"]{
    padding: 0;
    color: black;
    background: white;
}

 

Heroku: https://khmerweb-sale.herokuapp.com/login