Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# Locutus 3/1/2007 4:57 AM
Not sure this post belongs here, but it feels most suited to be in "Architecture".

For my Photo Gallery module, I tried using IFileService to save the uploaded images. The uploading works well, as does deleting using IFileService. However, the files written by IFileService don't inherit the NTFS permissions of the directory they are uploaded to. As a result, when I tried to use the uploaded image as ImageUrl for an asp:image control, I lacked the permissions to view the image.

I suppose I could read the image into a stream using IFileService and then have the image control load the stream, but that might hurt performance.

Is this by design, or is there perhaps another way to work around this?
# martijnb 3/2/2007 6:44 AM
The fileservice does nothing related to permissions etc. Maybe not-inheriting the permissions is caused by the fact that files are first uploaded to a temp directory and later copied to the final location in when committing the transaction.