File manager - Edit - /home/autoph/public_html/projects/ahg-hr/assets/FileService.d200b024.js
Back
import{a}from"./index.d09cba45.js";const t="https://ahg-hr-api.autohub.ph/api/v1/file",l={fetchRecords(e={}){return a.get(`${t}`,{params:e})},async Reader(e,s){try{const r=await a.get(`${t}/read?d=${e}&f=${s}`,{responseType:"blob"}),o=new FileReader;return new Promise((d,n)=>{o.onloadend=()=>{d(o.result)},o.onerror=n,o.readAsDataURL(r.data)})}catch(r){throw console.error("Error fetching image:",r),r}},async Reader2(e,s){try{const r=await a.get(`${t}/read?d=${e}&f=${s}`,{responseType:"blob"});return new Promise((o,d)=>{const n=new FileReader;n.onloadend=()=>{let c=n.result.split(",")[1];o(c)},n.onerror=d,n.readAsDataURL(r.data)})}catch(r){throw console.error("Error fetching image:",r),r}},Download(e){return a.get(`${t}/download/${e}`)},async create(e){return a.post(`${t}`,e)},async update(e,s){return a.put(`${t}/${e}`,s)},async remove(e){return a.delete(`${t}/${e}`)}};export{l as F};
| ver. 1.4 |
.
| PHP 8.1.32 | Generation time: 0.05 |
proxy
|
phpinfo
|
Settings