CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Show images uploaded by user

Print topic Send  topic

Author Message
Kostogher
Posted: 04/21/2004, 3:49 AM

I'm working on news articles.Users can upload images on server. On page MY ARTICLES I want to show only images uploaded by user. Registered user can see images uploaded only uploaded by him. How can I do that?
Can I have just one image folder for all users or as many folders as users. Any sample project?
peterr


Posts: 5971
Posted: 04/22/2004, 2:54 AM

One way may be to use different folder for each user.
ASP http://docs.codecharge.com/studio/html/Components/RTPro...FileFolder.html
PHP http://docs.codecharge.com/studio/html/Components/RTPro...FileFolder.html
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Langston
Posted: 04/24/2004, 12:29 PM

Isn't this a "half answer"?

Although you may be able to direct the upload to another directory, the file upload control only stores the file name and not the complete path of the file?

I am wrestling with a very similar issue. I modified the BookStore app to use a file upload control for products. There are several problems I won't go into here and have been posted before.

But the bottom line is: The file upload control may let you store a file anywhere but only stores the file name. If the file image location is not the root directory, you cannot display the image link directly from the database without additional programming.
peterr


Posts: 5971
Posted: 04/24/2004, 1:47 PM

Quote :
Isn't this a "half answer"?
Yes, since no one else did, I answered and was trying to be cautious and wrote "One way may be to..." and I don't know if this was sufficient or not (waiting for the user to reply). This is definitely something that I haven't tried and I don't want to pretend that I know the answer. If any users know the answer they're welcome to post here while I can also try to help a bit whenever I can (just like everyone else here I guess). I cannot promise the complete answers in all cases but I always recommend contacting our official support when the forums don't address your question(s).
In the meantime I'll try to find the answer but wanted to post this message so that you don't wait too long hoping for users to answer every question posted here. Please contact our support for the fastest resolution to your questions and issues. (I try to post answers even quicker here but as you noted I can't always guarantee that I can completely answer every question myself)

Please also keep in mind that we're dealing with different types of users. For some just an idea is enough, others require more details and usually will ask additional questions when needed.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
peterr


Posts: 5971
Posted: 04/24/2004, 8:25 PM

Hi,

I did a test and this worked for me in the "Before Build Insert" event of the form that contains the File Upload component (ASP):
FormName.DataSource.FileUpload1.Value = "abc/" & FormName.DataSource.FileUpload1.Value
(where FormName is the name of the form and FileUpload1 is the name of the file upload component.
This code allows changing the value of the filename in the database, for example to include the path name in front of it.

Additionally, you can use the standard methods of changing control values, such as shown at http://docs.codecharge.com/studio/html/QuickStart/EnhAp...FieldValue.html
For example you can add some hidden fields to your form and then save the User ID, Date Uploaded, Path, and any other information in them, usually using the "Before Insert" event.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
troy
Posted: 07/06/2005, 4:14 AM

hi there.

When a user registers they would be given a unique ID , so you would use the session varible "UserID' to bring up only that users image.

Thats what i have done in that situation...
GeorgeS

Posts: 206
Posted: 07/06/2005, 9:59 AM

On one of websites that I did we have 2000 users (& growing), so I rejected separate images folder for each user from the start.
As Troy I also use UserID session to filter images for each user.
I also use AspJPG component to resize some oversized pictures at the time of uploading and create thumbnails that are stored in subfolder.
_________________
GeorgeS
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.