Rank: Newbie Groups: Member
Joined: 6/1/2007 Posts: 6
|
Here are some things that I handrolled for the Microsoft .NET 2005 FileUpload control that would be nice to see in yours (although I can extend yours):
1) Save to permanent folder 2) Unique filename (perhaps with options to format, such as appending _00001, such as filename_00001.jpg) 3) Extension limiter, ideally on client-side, but at least on the server-side 4) Quickie photo resizing. No need for intensive photo manipulations in your control (we can do those in System.Drawing ourselves), but most of us will want/need to resize photos to shrink oversized user uploads to a manageable size. I have a client who uploaded a 2MB JPG to use on their web site, straight from digital camera. The final size they wanted was only 500px wide, and would have only been a 60-75KB JPG. Anyway, properties would be min/max width and height, and a flag to resize user uploads if too big 5) Along with #4 above, if the min/max height/width parameters are set, and resize = False, to FAIL if the user posts a badly sized photo. Let's say you needed a photo EXACTLY 150x150 pixel and they upload a 200x300 -- that should fail. 6) Ability to "preload" the control's PostedFiles. I know that HTML standards and safety are that you can not load to the actual Browse box. However, if we could pre-populate the "Uploaded Files" box that you have with files they have previously uploaded (we specify from a database or our own methods), that would allow them to have some state beyond just the initial upload. Many times people upload files and then at some point a day, a week, a month later would like to replace them, this would help.
Thanks for listening. You guys are the best! :d/
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,201
|
Hi Eric,
Thanks for your feedback. User feedbacks are extremely important to us and please be rest assured that we are always listening!
#1 and #2 makes sense. We will consider adding a FileLocation in addition to TempFileLocation. TempFileLocation is still needed since we maintain other files in the temp folder in addition to the real data file. Once the upload is complete, the control can automatically copy the data file from the TempFileLocation and a permanment FileLocation or provide methods for this task;
#3 is already implemented in our latest build which will be posted soon;
#4 and #5 makes sense. We will consider implement them in our next build;
#6 is not possible. There is no reliable way to "preload" an HTML file input element. Many browsers ignores the initial value and some of them that support it (Opera for one) displays a warning message when you do that, which brings more trouble to the user and defeats the purpose of preloading.
Thanks again for your extremely valuable feedbacks!
|
Rank: Newbie Groups: Member
Joined: 6/1/2007 Posts: 6
|
I wasn't clear on #6. As you stated and I tried to state, the Input=File can NOT be pre-populated. However, your AJAX-ified Upload box where it has:
(checkbox) Filename and size (checkbox) Filename and size [Button: Delete Selected Files] (checkbox) Filename and size
That could be prepopulated. That was what I was asking for -- a way to prepopulate that listing. This would allow the upload control to be used for more than just a single session state. Might not be possible since your temp files would be gone, and that's OK if it's not, but it would be nice to be able to give uploaded files some state and you're very close now, imo.
Thanks for the other answers. :-)
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,201
|
Hi Eric,
We'll think about that list. :) Just as you said it's not that easy since the temp files are already gone. But appreciate your feedback and we will certainly look into it!
Thanks
|