- Home
- Forum
- JavaScript - EJ 2
- Modify upload in filemanager
Modify upload in filemanager
My files are uploaded to s3, this is done in the beforeSend function using ajax which returns some info about the file which then gets sent to the server and saved.
Currently after the beforeSend function has completed and has saved the file to s3 the same file is being sent to the server in the uploadFiles attribute, how can I remove that attribute (and the file) from the upload and add my own custom attributes to the upload function?
SIGN IN To post a reply.
3 Replies
IL
Indhumathy Loganathan
Syncfusion Team
November 25, 2021 03:24 PM UTC
Hi Connor,
Greetings from Syncfusion Support.
From your explanation, we suspect that you are trying to write your own Upload operation for File Manager component and unable to understand your exact requirement to replace the upload file attributes as custom attributes, so kindly share more details about your exact use case scenario with File Manager component.
Is there any specific reason to write your own custom upload operation instead of using default upload of File Manager? Whether you want to change the basic file attributes such as name and type while uploading into Amazon S3 bucket. Also, share your tried out code snippet to get a better understanding of your requirement.
Regards,
Indhumathy L
CO
connor
November 25, 2021 03:58 PM UTC
Uploading a file has the following parameters;
uploadFiles: ,
path: ,
action: ,
data: how do I change the names of the params (e.g change 'uploadFiles' to 'file') and how do I add new fields to the upload?
SS
Sharon Sanchez Selvaraj
Syncfusion Team
November 26, 2021 03:29 PM UTC
Hi Connor,
Thanks for the clarification.
We have checked with your reported query. We would like to mention that, if the parameter names are changed, this would affect the existing functionalities and customizations would be required to make the entire Upload functionality to work properly in the provider side. However, to add extra parameters, you can pass it in the beforeSend event and access them.
Refer to the below forum where similar query is addressed.
And if you require to use external upload functionality, we suggest you to use an external Uploader component either through a custom button in the Toolbar or you can use it externally and achieve the required scenario.
Refer to the below forum where similar query is addressed.
Also please refer to the below documentation link on how to pass additional parameters in Uploader component.
Please get back to us if you need any further assistance.
Regards,
Sharon Sanchez S.
SIGN IN To post a reply.
- 3 Replies
- 3 Participants
-
CO connor
- Nov 24, 2021 09:10 PM UTC
- Nov 26, 2021 03:29 PM UTC