Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

395
Views
FILEPOND SERVER LOAD

I am working with Filepond to upload images asynchronously and have an update page to retrieve the already uploaded files. Now to retrieve a file already uploaded, we have to configure the file property and have to pass server file reference. Now my question is on load function of the server property I want to change the name of the server file reference with the name of the file. As in, on the update page I am loading the already uploaded image and want to change the source option with the filename of the file being loaded, so that on the update I can check if this is a new file or not.

Here is my pond

$("#ios-icon-pond").filepond({
    ...common_icon_properties,
    name: "app_submission_form[ios_app_icon]",
    className: "ios_icon_pond",
    labelFileProcessingError: (response) => {
        return serverResponse.message;
    },
    labelFileLoadError: (response) => {
        return serverResponse;
    },
    files: is_ios_new_record
        ? null
        : [
                {
                    // the server file reference
                    source: "ios_app_icon",
                    // set type to local to indicate an already uploaded file
                    options: {
                        type: "local",
                    },
                },
          ],
    server: {
        process: {
            url: "/app_submission_form_uploads",
            method: "POST",
            headers: {
                "X-Form-Type": "ios",
                "X-Image-Type": "ios_app_icon",
                "X-CSRF-Token": $('meta[name="csrf-token"]').attr("content"),
            },
            onerror: (response) => {
                serverResponse = JSON.parse(response);
            },
        },
        load: is_ios_new_record
            ? null
            : {
                    url: "/app_submission_form_uploads",
                    method: "get",
                    headers: {
                        "X-Image-Type": "ios_app_icon",
                        "X-CSRF-Token": $('meta[name="csrf-token"]').attr("content"),
                    },
                    onerror: (response) => {
                        serverResponse = "File not found";
                    },
                    // onload: (response) => {
                    //  // debugger;
                    // },
              },
        revert: null,
        fetch: null,
    },
});

In the above code, we have the server configuration, and it have a load property. What I want it on load, I want to change the source property(Server File reference) of the files object with the filename being loaded.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!