Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 2 Jahren, 8 Monaten
Letzter Beitrag:
vor 2 Jahren, 8 Monaten
Beteiligte Autoren:
Victoria Caballero, Fabrice Harari, Kingdr, Paulo Oliveira

WB 20: fFileExist issue...

Startbeitrag von Victoria Caballero am 17.06.2015 17:38

Hi everybody,
I have a WB 20 application running on my customer and I have an issue trying to show the PDF files in the browser.
In my Database I have a table called "Documents" where the customer can save the path of the PDF file corresponding to the document, like this for example: \\\Traspas\DestiTemp\8.pdf
So some of the documents are not in the same server, therefore the IP address used in the path. So before using FileDisplay to show the PDF in the browse I am checking if the file exists in the path.
PDFFileName is string = ATT_ArchivoPDF
IF fFileExist(PDFFileName) THEN
FileDisplay(PDFFileName, "application/pdf")
Info("The PDF file was not found")

So they always get the error message: The PDF file was not found
It looks like the app cannot open the PDF located in other server.... However if they use the same path in the Browser they can see the PDF without any problem.

Does anyone know why could be the reason of this issue?
Any advice or sugestion is welcome.




Hi Victoria

looks like the usual permissions problem

When running, your website is run under a user (iuser or some such) which has VERY limited permissions. In particular, it generally has access to ONLY the subdirectories of its own directory, and nothing else...

So if you want to continue with your documents stored outside of the DB (which would NOT be my choice), then you need to give explicit permission for this user on each and every one of the directories used, and through the network, that can easily become a nightmare, without even talking about security risks

I would advise that you store your documents inside the DB instead

Best regards

von Fabrice Harari - am 17.06.2015 17:51
If your WB site is using IIS and is for intranet only you can change the WD200AWP alias in the IIS to use windows authentication instead ofthe default user mentioned by Fabrice.

In this case you must ensure that all the users runnig your app have at least read permission to your app folders.

If you don't want ou can't store the documents in the DB the only way is using window authentication (the user of the pc is used to run your app in the server) in the IIS or define in the IIS one user with permission to the share instead of the default user (if you go this way don't forget the password of this user can't expire).
If it's apache the only way is changing the users that runs the apache service.


von Paulo Oliveira - am 17.06.2015 18:10
Hi guys!
thanks for your response...
I agree with you Fabrice about storing the PDFs in the DB however it is my cliente who has decided to do it like this... According to them it will take too much space to store the PDFs files inside of the DB and therefore everything will be much slower... I was not able to convince them otherwise... And then they have also decided not to save the PDFs in the same server where the app it is installed but in another one... which makes the things even worst :-(.
I will try to convince them to change this or else I will try to take Paulo sugestion...
Let's see how it goes...
Thanks again.



von Victoria Caballero - am 18.06.2015 09:55

Paulo one is the best solution in your case but I have been using mostly hyperfile memos
to hold pdf and binary files and it doesn't take much time to deal with upload/download
but needs to do a little work to do the extraction.

I think you are also an expert and it depends on how to convice your customer to deal with.
You can have numerous .mmo files as a cluster and a master file to hold id/title and subjects
with dateStamped as archiving files.

Good luck.



von Kingdr - am 18.06.2015 10:50
Yes, the DB is actually MS-SQL. I have been working with storing binary files in SQL in many projects so I know it works fine and it is a good solution.
I think I need to be more convincing with my customer :-).
Thanks King.



von Victoria Caballero - am 18.06.2015 11:39
Hi Victoria,

another way around the problem, if all the files are stored on the same server, would be to install a webservice on that server and call it from your web site... The webservice would just return the desired file (or an error if it does not exist)

A simple awp page can do that very easily

Best regards

von Fabrice Harari - am 18.06.2015 14:52
Hi Fabrice,
thanks for your suggestion :-)
It sounds like a good idea.


von Victoria Caballero - am 18.06.2015 18:06
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.