Scheduled Maintenance: 10-11-2025 Electricity company maintenance between 09:00 and 15:00.
3.2 & 3.3 Extensions Database 3.2 / 3.3 ⇒ File Upload
-
TheFactor82
- Users

- Posts: 15
- Joined: 17 Nov 2017, 14:42
Re: File Upload
Mmmm, sorry, maybe I'm missing something...
This extension is for FILES upload... (rar, zip, etc)... Not specifically for images...
And is in that way that I would like to use it (I need in my case to upload xml files, that will be updated from time to time locally and then uploaded everytime - so that's why I need the possibility to overwrite them).
This extension is for FILES upload... (rar, zip, etc)... Not specifically for images...
And is in that way that I would like to use it (I need in my case to upload xml files, that will be updated from time to time locally and then uploaded everytime - so that's why I need the possibility to overwrite them).
-
dmzx
- Founder

- Posts: 6469
- Joined: 13 Jan 2014, 21:45
Re: File Upload
Image upload and file upload are almost the same in code so they work the same with the name.TheFactor82 wrote: 01 Dec 2017, 14:13 Mmmm, sorry, maybe I'm missing something...
This extension is for FILES upload... (rar, zip, etc)... Not specifically for images...
And is in that way that I would like to use it (I need in my case to upload xml files, that will be updated from time to time locally and then uploaded everytime - so that's why I need the possibility to overwrite them).
What you can try is this line:
https://github.com/dmzx/File-Upload/blo ... d.php#L222
change it to:
Code: Select all
'fileupload_realname' => ucfirst(str_replace('_', ' ', preg_replace('#^(.*)\..*$#', '\1', $upload_file->get('uploadname')))),Let me know if that solved your question
-
TheFactor82
- Users

- Posts: 15
- Joined: 17 Nov 2017, 14:42
Re: File Upload
Thank you for your support!
It works exactly the opposite of what I need...

The first row shows how the original extension works.
The second row shows the result with you suggested mod.
I would like to obtain that FILE NAME and REAL FILE NAME are the same... But with readable name, not "generated" name
It works exactly the opposite of what I need...

The first row shows how the original extension works.
The second row shows the result with you suggested mod.
I would like to obtain that FILE NAME and REAL FILE NAME are the same... But with readable name, not "generated" name
-
TheFactor82
- Users

- Posts: 15
- Joined: 17 Nov 2017, 14:42
Re: File Upload
Sorry for late reply...
It's not working like it should...
Currently in ACP shows for both real file name, and file name, the same "readable" name.
But in the FILES folder, the file is saved with the "generated" filename...

It's not working like it should...
Currently in ACP shows for both real file name, and file name, the same "readable" name.
But in the FILES folder, the file is saved with the "generated" filename...
-
martin Online
- Admin

- Posts: 5106
- Joined: 06 Apr 2014, 16:12
Re: File Upload
If it looks like this image then its working perfect.
You do not have the required permissions to view the files attached to this post! Maybe your post count is too low.

-
TheFactor82
- Users

- Posts: 15
- Joined: 17 Nov 2017, 14:42
Re: File Upload
No, it's works in this way:
on ACP I can see file names:

(you can also see that file size is 0 bytes).
But in "files" folder, the file is uploaded with "generated" filename:

What I need is that the file remains with original filename...
on ACP I can see file names:

(you can also see that file size is 0 bytes).
But in "files" folder, the file is uploaded with "generated" filename:

What I need is that the file remains with original filename...
-
dmzx
- Founder

- Posts: 6469
- Joined: 13 Jan 2014, 21:45
Re: File Upload
will check this.TheFactor82 wrote: 04 Dec 2017, 14:43 No, it's works in this way:
on ACP I can see file names:
(you can also see that file size is 0 bytes).
But in "files" folder, the file is uploaded with "generated" filename:
What I need is that the file remains with original filename...
-
martin Online
- Admin

- Posts: 5106
- Joined: 06 Apr 2014, 16:12
Re: File Upload
Taking into account phpbb renames things for security reasons 
-
TheFactor82
- Users

- Posts: 15
- Joined: 17 Nov 2017, 14:42
Re: File Upload
So it means that it is not possible??
-
dmzx
- Founder

- Posts: 6469
- Joined: 13 Jan 2014, 21:45
Re: File Upload
No its possible but need to check the edits.
-
martin Online
- Admin

- Posts: 5106
- Joined: 06 Apr 2014, 16:12
Re: File Upload
99% of things can be done but now think why files are encrypted
I'l give you 2 reasons why NOT to have files in real names
1 I can upload a naughty zip on to your server now i know the path and file name so i can now call that file in the folder and have fun.
2 You upload a vip folder and now all non vip can all call the folder and help them self (if you know how too that is)
I'l give you 2 reasons why NOT to have files in real names
1 I can upload a naughty zip on to your server now i know the path and file name so i can now call that file in the folder and have fun.
2 You upload a vip folder and now all non vip can all call the folder and help them self (if you know how too that is)
-
TheFactor82
- Users

- Posts: 15
- Joined: 17 Nov 2017, 14:42
Re: File Upload
Sorry for that, but I don't get the point of what you are saying...
File-upload does NOT encrypt files. Simply, it renames them in order to avoid overwrites. In fact, you can normally rename the "40696abb215321ae78045a579c07a354.zip" or whatever to anything else, and you can still open it without any problem.
Also speaking about reasons of why it happens, I think that it is totally normal that a file is reachable on a server: when you use file-upload, it gives you exactly the path to the file... It's exactly what it's planned to do. If I share an url to a file uploaded with this extension, it's indifferent if it is the real filename or a generated filename...
Sorry if I'm missing something... And Thanks Dmzx for the time you are spending on this request!
File-upload does NOT encrypt files. Simply, it renames them in order to avoid overwrites. In fact, you can normally rename the "40696abb215321ae78045a579c07a354.zip" or whatever to anything else, and you can still open it without any problem.
Also speaking about reasons of why it happens, I think that it is totally normal that a file is reachable on a server: when you use file-upload, it gives you exactly the path to the file... It's exactly what it's planned to do. If I share an url to a file uploaded with this extension, it's indifferent if it is the real filename or a generated filename...
Sorry if I'm missing something... And Thanks Dmzx for the time you are spending on this request!
-
martin Online
- Admin

- Posts: 5106
- Joined: 06 Apr 2014, 16:12
Re: File Upload

Dude i know how it works i'm the one who converted this ext from what it was.
-
TheFactor82
- Users

- Posts: 15
- Joined: 17 Nov 2017, 14:42
Re: File Upload
Ehy, it was not my intention to be rude, I'm just trying to understand. 