Manually upload files
Closed this issue · 0 comments
omidnikrah commented
Hi, I want to set endpoint address dynamically and write the following codes but uploadStoredFiles
method not working and don't show any error.
why?
import FineUploaderTraditional from 'fine-uploader-wrappers';
const UploaderConfig = new FineUploaderTraditional({
options: {
autoUpload: false,
request: {
endpoint: 'http://test.com',
},
chunking: {
enabled: true,
concurrent: {
enabled: true,
},
success: {
endpoint: 'http://test.com',
},
},
resume: {
enabled: true,
},
retry: {
enableAuto: true, // defaults to false
},
deleteFile: {
enabled: true, // defaults to false
endpoint: 'http://test.com',
},
callbacks: {
onSubmit: function(id) {
handleUpload();
}
}
},
});
const handleUpload = () => {
UploaderConfig.options.request.endpoint = "https://example.com";
UploaderConfig.methods.uploadStoredFiles();
}
export default UploaderConfig;