Simpler file upload?
Permalink
Howdy people,
I've recently set up a fairly customised C5 install where I'm using user profiles heavily. Using custom user attributes, I've been able to set up quite complex user profiles, where users can check checkboxes, enter in addresses, etc. Works quite well I think.
I've added as a user attribute a file/image where the user can upload a logo (separate from the avatar which I'm using elsewhere). I've been able to configure this so that the user only sees their files and can only upload images.
I'm concerned though that for my case, the built in file uploader will be just a little complicated. I love it, but I'm thinking the average user will just want to upload one file and be done with it. It is the step where they have to also choose their uploaded file that I'm worried about.
Does anyone have any ways or thoughts on how I could simplify the file upload in this case, like auto-choosing the uploaded file? I'm thinking that I might need to create a new attribute type that bypasses the built in file management. I'd prefer not to have to do this!
Any help/thoughts would be appreciated.
-Ryan
I've recently set up a fairly customised C5 install where I'm using user profiles heavily. Using custom user attributes, I've been able to set up quite complex user profiles, where users can check checkboxes, enter in addresses, etc. Works quite well I think.
I've added as a user attribute a file/image where the user can upload a logo (separate from the avatar which I'm using elsewhere). I've been able to configure this so that the user only sees their files and can only upload images.
I'm concerned though that for my case, the built in file uploader will be just a little complicated. I love it, but I'm thinking the average user will just want to upload one file and be done with it. It is the step where they have to also choose their uploaded file that I'm worried about.
Does anyone have any ways or thoughts on how I could simplify the file upload in this case, like auto-choosing the uploaded file? I'm thinking that I might need to create a new attribute type that bypasses the built in file management. I'd prefer not to have to do this!
Any help/thoughts would be appreciated.
-Ryan
Bump? :-(
Not sure if this helps, not sure how your currently getting the uploaded files but you could use the form block with the "file upload" attribute. Or you can create your own block/coded based on this simple upload idea.
EDIT: Or you can just use HTML to do the trick, Not sure how much simpler you want.
EDIT: Or you can just use HTML to do the trick, Not sure how much simpler you want.
<form action="action.php" enctype="multipart/form-data" method="post">
Thanks CP, I'll have a look at the way the form block handles it, it might give me some ideas. Cheers.
You should just be able to add it to the form, but I do agree that this most likely should be an attribute of the user. But if you create your own, it might be simple to just have a database with the fileID and userID. Or under the attribute just save the FileID instead of a file location. Alot more easier to manage. If you need more details, I'll be glad to help, or even sample code.
I just had to do this for a project. Here you go:
http://c5blog.jordanlev.com/blog/2011/12/file-upload-attribute-for-...
http://c5blog.jordanlev.com/blog/2011/12/file-upload-attribute-for-...
That's awesome, you da man.
I ended up with my project simply using the built in file manager and disabling for users the ability to create sets. As the file manager is a bit daunting for some users, my client and I created some additional documentation. It wasn't the ideal solution, but every project has its budget.
However, I KNOW this will come up again in the future, so I'm sure this will be very handy.
Cheers Jordan.
I ended up with my project simply using the built in file manager and disabling for users the ability to create sets. As the file manager is a bit daunting for some users, my client and I created some additional documentation. It wasn't the ideal solution, but every project has its budget.
However, I KNOW this will come up again in the future, so I'm sure this will be very handy.
Cheers Jordan.