Re: Problem uploading file to Sharepoint
- From: Yorch <Yorch@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 20 Apr 2007 09:20:02 -0700
Hi Mike. Thank you for your help. It was very helpful. Another question.
Where and how can i change that parameters for the "!New" Advice?
"Mike Walsh" wrote:
.I have a doubt in other matter of SPP 2003. When you upload a file, an
advice of "!new" appears. How long than advice appears? Can i control when
appears or not?
(It's SPS 2003 ... )
!New appears until midnight server time.
Default is either the same day until midnight (=1) or one day plus the next
day until midnight (=2)
(I can never remember which - one default is valid for STS and another for
WSS 2.0 / SPS 2003).
To amend the default value (where amending the number after -pv to 4 would
give *3* full days plus the final day until midnight) follow this KB article
http://support.microsoft.com/?kbid=825510
(which is actually for stopping !New from appearing at all - hence the use
of -pv 0 )
Mike Walsh
WSS FAQ http://www.wssfaq.com
No private e-mail please.
"Yorch" <Yorch@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:FD51B1B6-3AC7-4B67-B52B-DF65F7395F6E@xxxxxxxxxxxxxxxx
Hi Brian. I have that problem too, but i have it with a user. That user
have
permission to update a file in an area of a site. He update the file with
other changes and then he open that updated file and appears like before
(without the update). I noticed that his problem is only in his machine
because i did the same excersise in other computers and i can do it
without a
problem.
I did'nt review too much that error but maybe is the configuration of the
explorer or something.
I have a doubt in other matter of SPP 2003. When you upload a file, an
advice of "!new" appears. How long than advice appears? Can i control when
appears or not?
Good bye.
Yorch
"Brian Roisentul" wrote:
Hello,
I'm developing a windows application to upload files to Sharepoint.
The problem is that, although I can upload files to a document
library, when I try to overwrite one, the files uploads successfully,
but its content belongs to the old one.
I've created a var called "string_file" to see the file content
(converted to string), so I can check its ok. When I check this var, I
can see that the content is right, but I don't know why it isn't when
uploading.
For example:
* I upload "file1.txt," with the text "hello" in it.
* If I check the Sharepoint site I can see the file uploaded
correctly.
* Then, I modify the file content to "bye".
* Upload the file again.
* I refresh the Sharepoint site, click the "file1.txt" and I see
"hello", instead of "bye".
Which could be the problem? any ideas?
I leave you the code here so you can better undestand.
**********************************************************************************************************
BEGGINNING OF CODE
**********************************************************************************************************
private void addToSharepoint(string url, string file, byte[] content)
{
//Open web.
SPWeb web=new SPSite(url).OpenWeb();
//Get folder.
SPFolder fld=web.GetFolder(doclib);
//Get subfolder.
SPFolder subfld = fld.SubFolders[doclib_subfolder];
//Check file content(in debug mode).
string file_string = System.Text.Encoding.UTF8.GetString(content);
FileInfo fi=new FileInfo(file);
SPFile uploadedFile=subfld.Files.Add(fi.Name,content,true);
web.Update();
web.Close();
}
**********************************************************************************************************
END OF CODE
**********************************************************************************************************
Brian
- Follow-Ups:
- Re: Problem uploading file to Sharepoint
- From: Mike Walsh
- Re: Problem uploading file to Sharepoint
- References:
- Problem uploading file to Sharepoint
- From: Brian Roisentul
- RE: Problem uploading file to Sharepoint
- From: Yorch
- Re: Problem uploading file to Sharepoint
- From: Mike Walsh
- Problem uploading file to Sharepoint
- Prev by Date: Re: App Pools virtual memory recycle settings?
- Next by Date: MOSS 2007 with which version of SQL?
- Previous by thread: Re: Problem uploading file to Sharepoint
- Next by thread: Re: Problem uploading file to Sharepoint
- Index(es):
Relevant Pages
|