c# - Dynamically change the Flajaxian upload folder name -
i trying dynamically change upload folder name, it's not working form me. please help.
i using flajaxian s3 amazon uploader. code follows
<fjx:fileuploader id="fileuploader1" runat="server"> <adapters> <fjx:directamazonuploader onfilenamedetermining="fileuploader1_filenamedetermining" accesskey="webconfig:amazonaccesskey" secretkey="webconfig:amazonsecretkey" bucketname="media.sitename.com" /> </adapters> </fjx:fileuploader>
server side code follows
protected void page_load(object sender, eventargs e) { ((com.flajaxian.directamazonuploader)fileuploader1.adapters[0]).path = request.params["sid"].tostring(); } protected void fileuploader1_filenamedetermining(object sender, com.flajaxian.filenamedeterminingeventargs e) { random r = new random(); e.filename = r.next(10000) + ".jpg"; }
if hard code path, it's working fine. dynamic update of path folder not working. please me.
thanks.
((directamazonuploader)fileuploader1.adapters[0]).path = putyourvariablehere+"/";
Comments
Post a Comment