Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>@Paul, I really like your answers, and I think that in normal web applications where there is a known and relatively small set of potential upload target directories, you have the proper solution: 1 - If the application might have users that do NOT have Append Data privieleges, all upload directories should have a known test file that Append operations are tested against to check prior to uploading.<br> 2 - If there is no worry about Append Data privileges, then the application can just write out an empty version of the file and append to it on upload. I'm accepting your answer to make sure you get credit for this.</p> <p>Unfortunately, in my application we do NOT have a finite or known set of upload target directories -- any share or folder in the network may be accessible. What we are going to implement is buffering of the upload data in relatively small chunks and open the target file in Append mode BUT hold a FileStream OPEN for the duration of the upload (yes there are concerns for handling FileStreams that are this long lived) This gives a fast exception (happens as soon as the first chunk is written to the FileStream) if there are no write privileges w/o being dependent on Append Data privileges. But I would NOT recommend this design to anyone -- if you can get away with it try one of @Paul's suggested solutions. And if you don't have to worry about early messaging of lack of write privileges on upload, just handle the exceptions and don't worry about it.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload