Hi
I have used the custom provider to upload to my amazon s3 bucket. I have set the SubfolderStructure to a path (lets sat abc/def ) but I want to be able to append to this at runtime based on the type of file I am uploading (or a parameter/setting I can set on the control or page), ie keep my images files in my abc/def/images folder and for docs use abc/def/docs so all I need do is store the value "images" or "docs" on the page and pass this to the provider at runtime and append to the SubfolderStructure. I guess a attribute called Path on the RadCloudUpload control would do the job but I couldn't see one?
So my question is, what's the best way of getting a parameter from the page to the provider?
Thanks
Tim
5 Answers, 1 is accepted
I would suggest you to save that information to the System.Configuration.ConfigurationManager.AppSettings collection and then retrieve it from there in your Custom provider.
I hope that the above helps you. If you have any further questions, please do not hesitate to contact us.
Regards,
Veselin Tsvetanov
Telerik by Progress
Hi Veselin
That might make sense if it was a once only static value but I need to change it for each upload (ie if I am uploading images I store in the Images directory, docs go in the docs directory etc), I cant really write to the web config each time. The provider doesn't know the file type of anything about the folder except for the SubFolderStructure thats declared in the web config anyhow. I need to add the final folder to the SubFolderStructure for each upload. We could be storing millions of files in S3 I dont want them all in 1 directory.
Suggestion for new feature to be able to add the final folder to the upload cloud control. For now I think I need to add a new provider for each folder variation unless you can think of a better solution.
Many thanks
Tim
Implementing two different custom providers for the different types of files is a valid choice for your scenario. You are also right that changing values in the web.config AppSettings for each upload would be overkill if you are about to upload millions of files.
Your suggestion to add path (folder) CloudUpload property that could be changed runtime could be a viable solution for similar scenarios of other customers too. Therefore, I would recommend you to log it as feature request in our Feedback portal. Based on the support it receives from the community we will consider and decide on its future implementation.
Regards,
Veselin Tsvetanov
Telerik by Progress
Hi Veselin
In the end I had to create n number of different providers for n number of different file types. I had to also create n different handlers where each one would set the name of the provider to use from the n number of items. I also had to add to the list of n providers in (the web.config) which had the hard coded folder name, a tad excessive but it works.
I'll post a request for an update.
Thanks again
Tim
Thank you for getting back to us and letting us know, how you have resolved the issue faced. Thank you also for the suggested improved functionality of the RadCloudUpload control.
Regards,
Veselin Tsvetanov
Telerik by Progress