Re: Problem uploading file to Sharepoint

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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




.



Relevant Pages

  • Re: Problem uploading file to Sharepoint
    ... How long than advice appears? ... Can i control when ... I'm developing a windows application to upload files to Sharepoint. ... I refresh the Sharepoint site, click the "file1.txt" and I see ...
    (microsoft.public.sharepoint.portalserver)
  • Re: Problem uploading file to Sharepoint
    ... Where and how can i change that parameters for the "!New" Advice? ... "Mike Walsh" wrote: ... >> I'm developing a windows application to upload files to Sharepoint. ... >> * If I check the Sharepoint site I can see the file uploaded ...
    (microsoft.public.sharepoint.portalserver)
  • Re: Uploaded TeX reconsidered
    ... The advice was to change the name of the file, ... that advice pertained to getting around your supposed caching problems so you could upload a *brand new* file created from a minimal example -- go back and read it *in context*. ... The other advice, to upload a completely different file created on somebody else's system, was meant to help diagnose file transfer problems. ... If you get the same result when downloading two different files from the same server, the problem is far more likely to be the server than it is to be your cache. ...
    (comp.text.tex)
  • Re: Uploaded TeX reconsidered
    ... The advice was to change the name of the file, ... The advice you quote below asked you to *upload* the ... Reading through your post I can't help thinking that you guys are as human ... If the cache has never seen ...
    (comp.text.tex)
  • Re: Uploaded TeX reconsidered
    ... The advice was to change the name of the file, ... upload the file with a new name. ... was meant to help diagnose file transfer problems. ... server than it is to be your cache. ...
    (comp.text.tex)