Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

Tasso

Thanks!

Thanks very much!

That would be very very important for programmers who love to work on live servers which is like being a surgeon operating on an open hearth.

I am bowing to you.

Thanks again,
Bye from Italy,
Davide Tassetti.
martin

Tasso wrote:

This changes the problem from having a 'partial uploaded' script prone to errors to a missing script while it is being uploaded.

In both cases if the transfer interrupts I have or a half file (with parse error) or a missing file (with http 404 errors).

The next version will remove the file only after transfer to temporary file finishes.
Tasso

TS wrote:

WinSCP already does this for files > 100kB by default. You can change the 100kB limit to something else if you prefer.


Thanks for the reply, but that isn't the solution: first it works only for binary data, but i forced binary uploads per each file, even .php

Second and mosto important WinSCP first deletes the file, then creates the 'growing' .filepart and then renames it to the original.

This changes the problem from having a 'partial uploaded' script prone to errors to a missing script while it is being uploaded.

In both cases if the transfer interrupts I have or a half file (with parse error) or a missing file (with http 404 errors).

IMHO me the solution would be using the resume option if this WOULD NOT DELETE the file while uploading it.

Thanks, bye.
TS

WinSCP already does this for files > 100kB by default. You can change the 100kB limit to something else if you prefer.
Tasso

Parse errors uploading php files on live servers

Using winscp (and many ohers...) to upload files to live webservers causes temporary and impredictable errors, I'll explain with an example:

I am uploading a 100k script on a live server and this takes 2 seconds.
While uploading someone on the Net calls some page that uses that script.
The server includes/uses a partially uploaded file giving most of the times parse errors and some rare times unpredictable errors.

The solution could be simple: upload the file (ex. auth.php) to a temporary file (ex. auth.php.winscp.tmp) and only when 100% uploaded it renames the temp to the originary file overwriting it.

This would make live uploads secure with Winscp!