Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
curt  
#1 Posted : Wednesday, May 9, 2012 9:18:54 AM(UTC)
curt

Rank: Newbie

Groups: Member
Joined: 5/9/2012(UTC)
Posts: 2

I need to be able to rename files after they are uploaded with a name that includes the user's ID number. That way a single user's uploads are easily identifiable. This is a necessity on my Web Site. Unfortunately, I cannot find a solution. I am developing in ASP.NET C# in VS2010.

The file upload page will not read a 'user ID' cookie that is created when the user logs in, nor will it read a Session variable that is created when a user logs in. I have also noticed that the value of HttpContext.Current.Session.SessionID on the upload page is different than the value that persists on all other pages of my web site. I have reviewed the sample code, but I cannot see that this issue is addressed. Of course, I could ALWAYS be wrong!

All I want to do is rename, for example, the default upload file name of say 'FILEUPLOAD95' and rename it (and save it) as something like '200_FILEUPLOAD95'. This should be easy but the file upload page does not seem to communicate with the rest of my solution. Please Help! Thanks.

CurtDancing

Edited by user Wednesday, May 9, 2012 9:22:01 AM(UTC)  | Reason: Not specified

Dmitry.Obukhov  
#2 Posted : Thursday, May 10, 2012 12:57:38 AM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello Curt,

Your requirement is possible to implement. I attached very simple web-application with Aurigma Up. Please download and try it. In the code-behind I set session variable. Then I set Aurigma Up url so that the session is sent along with files. This variable is parsed on the server side and used as prefix for file names.

If you have any additional questions or problems please let me know :)
File Attachment(s):
AurigmaUp_ASP.NET.zip (127kb) downloaded 53 time(s).
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
curt  
#3 Posted : Thursday, May 10, 2012 9:50:53 AM(UTC)
curt

Rank: Newbie

Groups: Member
Joined: 5/9/2012(UTC)
Posts: 2

Thanks Dmitry...I get it now. Very clever. I appreciate your help!!!

Curt
Dmitry.Obukhov  
#4 Posted : Thursday, May 10, 2012 11:00:38 PM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Thank you for your comment, Curt.
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
jmg  
#5 Posted : Friday, May 18, 2012 1:01:47 PM(UTC)
jmg

Rank: Newbie

Groups: Member
Joined: 5/18/2012(UTC)
Posts: 1

Hello,

We are trying to accomplish the file rename as well. We have attempted to implement the process from your example above, however the value for Request.Cookies["userId"].Value.ToString() is always empty.

Any thoughts?

Thanks
Joe
Dmitry.Obukhov  
#6 Posted : Sunday, May 20, 2012 9:51:44 PM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hi Joe,

Please try the sample I attached to this post. There was mistake in name of cookie. It should be so:
Code:
string id = Request.Cookies["id"].Value.ToString();
File Attachment(s):
AurigmaUp_ASP.NET.zip (127kb) downloaded 7 time(s).
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.