rejetto forum

Software => HFS ~ HTTP File Server => Bug reports => Topic started by: D on September 16, 2021, 10:54:00 PM

Title: False errors on upload
Post by: D on September 16, 2021, 10:54:00 PM
They only appear in logs. I'm using HFS 2.3m

Code: [Select]
Upload failed for 20210916_221111.jpg: Not allowed.
Upload failed 20210916_221111.jpg
Upload failed for 20210916_221155.jpg: Not allowed.
Upload failed 20210916_221155.jpg
Upload failed for 20210916_221259.jpg: Not allowed.
Upload failed 20210916_221259.jpg
Requested POST /
Uploading 20210916_221111.jpg
Fully uploaded 20210916_221111.jpg - 71.2 K @ 316.4 KB/s
Uploading 20210916_221155.jpg
Fully uploaded 20210916_221155.jpg - 114.0 K @ 797.2 KB/s
Uploading 20210916_221259.jpg
Fully uploaded 20210916_221259.jpg - 163.8 K @ 1.1 MB/s
Title: Re: False errors on upload
Post by: Mars on September 17, 2021, 11:15:34 PM
Appears for one of the following reasons:

when sending each file with the method that was used for it
- the logged in user does not have write rights to upload file in the folder
- the user and the password used do not correspond to a registered account values
Title: Re: False errors on upload
Post by: Wg816 on January 26, 2023, 05:22:13 AM
Did you ever figure out what was causing this?  I have the same problem. 
1. The log will say "Upload failed for VID.mp4: Not allowed. "
2. The file will upload
3. The file will upload again!
4.  Log: "Upload successful" 
Title: Re: False errors on upload
Post by: Wg816 on January 26, 2023, 09:33:42 AM
Appears for one of the following reasons:

when sending each file with the method that was used for it
- the logged in user does not have write rights to upload file in the folder
- the user and the password used do not correspond to a registered account values

I think I'm on to something based on the second thing you said.  When the users download a file, it says "User@ipaddress:port" on the server log.
When the user goes to the "Upload" folder to send a file, the server log does NOT have the user.  It only says "ipaddress:port."  The user may have permissions to the folder, but only the IPaddress is shown to be the one accessing the folder.  The file is sent, deleted, and then sent again successfully.  Very weird.

Solution??  right click on "Upload" folder and set Access to "Anyone" and Upload to "Anyone."   Problem solved in a bad way.

Why does the User disappear from the log only in that specific folder with?   What's a better solution?
Title: Re: False errors on upload
Post by: Mars on January 26, 2023, 10:15:57 PM
so it looks like this folder is visible in the VFS, since you changed the access properties there

try to go to the diff template tab and you can place a customization of the upload results there by adding this section

Code: [Select]
[+upload-success]
{.add to log|{.filename|%item-resource%.}=uploaded by {.if|{.length|%user%.}|%user%|Anonymous /if.}./add to log.}
Title: Re: False errors on upload
Post by: rejetto on February 09, 2023, 10:30:28 AM
don't you have any idea of what is the difference between failed attempt and successful attempt?
consider we are not looking at you when you are doing it, so it's not easy to guess.

anyway, if I were you I'd be using HFS 3, that now supports uploads. I'm not working on version 2 anymore.
https://github.com/rejetto/hfs