Frequently Asked Questions
- Does SlickUpload work with trace enabled?
- No.
- On ASP.NET 1.1, using Forms Authentication, anonymous users cannot upload.
- This is a bug or "feature" of v1.1, as it works fine with v2.0. If it's absolutely
imperative for anonymous users to be able to upload, contact us for a custom build
that hooks in earlier to enable anonymous users to upload. This has the drawback
of removing access to session state from within a CustomFileNameGenerator or UploadLocationProvider.
- How do I specify a custom upload path?
- Use a relative path using "~/" notation.
- If no upload path is specified SlickUpload will attempt to use a temporary folder.
- Is it possible to have a form with multiple file uploads, each with its own progress bar?
- Yes, it would be possible. However, the uploads are done sequentially, not in
parallel, so each upload would happen individually. What you may want to do is have
a progress bar for the entire upload overall, and one for the current file. SlickUpload
has functionality that will allow you to determine which file is currently being
uploaded. Then, you can just have a text field that displays that information.
- Can I change the file name dynamicly when storing the uploaded file?
- Yes. You can use HttpUploadModule.GetUploadedFiles() from the page after the upload
is complete and move the files there. This is the quick and dirty solution.
- Better is to implement a CustomFileNameGenerator (look at the sample for this).
This is the elegant solution -- it allows you to specify a filename to the upload
module so that the upload goes to the right place the first time.
- If the uploaded file exists, how can I overwrite it?
- Specify the action you want to take in the existingAction attribute of the uploadLocationProvider
tag. So to overwrite the existing file, it would look like this
<uploadLocationProvider provider="File" location="c:\somefolder" existingAction="Rename" />
There are three options available:
- Overwrite
- Exception
- Rename
- Can I specify the location and filename of the file to be uploaded from
the client computer?
- No browser allows a page to specify a file on the users computer -- that would
be a huge security hole. The user has to pick the file himself.
- How can I limit what types of files are uploaded?
- SlickUpload doesn't curretly support filtering built in, but you can implement
it with client side code. Trap the onchange event which will tell you when someone
has selected a file. If that file doesn't have the proper extension, show a message
or remove the file.
- What permissions are required for SlickUpload?
- ASP.NET must have permissions to write to the location you are uploading
the file to. The default for Windows 2000 (IIS 5) is the ASPNET user. For Windows 2003 (IIS 6) and Windows 2008 (IIS 7) the default is
IISWPG.
- How can I get the information about uploaded files after the upload is complete?
- Call the HttpUploadModule.GetUploadedFiles method in a page to get the collection
of files that were uploaded during the context of a given request, or null if no
files are uploaded.
- How do I get the full path of the file uploaded to the server (using the File UploadStreamProvider)?
- Index into the UploadedFile.LocationInfo property, like so:
string path = file.LocationInfo[FileUploadStreamProvider.FileNameKey];
- What are the licensing options for SlickUpload?
- Licensing information is available at our purchase page.
|