Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Modify file object (name) before upload to the server #993

Open
1 task done
nike1v opened this issue Aug 12, 2024 · 4 comments
Open
1 task done

[Feature] Modify file object (name) before upload to the server #993

nike1v opened this issue Aug 12, 2024 · 4 comments

Comments

@nike1v
Copy link

nike1v commented Aug 12, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe.

I'm trying to add timestamp to the filename, but I can't imagine how to make it work with JQuery FilePond. I do need this because I can't modify the file.source after the file uploaded to replace File to a URL of the uploaded file.

Describe the solution you'd like

I'd like to be able to change the name of loading file (or any other property) in the File object OR be able to replace processed file with URL from backend.

Describe alternatives you've considered

I've tried to use oninit, beforeAddFile, onload (in process) to replace file that is being uploaded.

@rikschennink
Copy link
Collaborator

https://pqina.nl/filepond/docs/api/plugins/file-rename/ ?

@nike1v
Copy link
Author

nike1v commented Aug 12, 2024

This makes sense, thanks! Thought that plugin is for users to rename file before upload. My bad!

@nike1v nike1v closed this as completed Aug 12, 2024
@nike1v nike1v reopened this Aug 12, 2024
@nike1v
Copy link
Author

nike1v commented Aug 12, 2024

But I have to mention, that this worked for the processing file, but when I'm clicking on a file to delete it, I receive in onremovefile old name of the file.

@rikschennink
Copy link
Collaborator

I believe the file is renamed before upload.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants