Image or document file/database locaion

I use dropbox for storage of uploaded pdf/jpg for a project. This way someone can add a document into the shared dropbox on their computer and it shows up on the production server which shares the same dropbox folder. When I try to add a image/database or image/filename to a form on the production server, it uploads and saves, but shows as a broken link. My image location is c:\users\ms2017\dropbox\ARC\RCRaddons and I’m running under Windows.

Where exactly should I put this full path so it will retrieve the document? I’ve tried one of everything but apparently not the correct thing. I don’t care if it is image/filename or image/database…these are very small files.

Because of security, you are normally only allowed to access files in location starting with your root directory

It will be easier to move your share dropbox directory to the doc directory of your project

You can also use a files synchronization software that will synchronize the files between the project directory and your dropbox directory

1 Like

You can get the path of your document directory here

$_SESSION[‘scriptcase’][‘appname’][‘glo_nm_path_doc’];

it’s not available in every app, so I usually capture it at Login

[doc_path] = $_SESSION[‘scriptcase’][‘app_login’][‘glo_nm_path_doc’];

Great. Will check all. That does make it more clear!

When I look at system folders, is that for ALL projects or does it allow change by project?

You decide of the location of the system folder when you publish, for the dev system the path are defined in option / settings / system folders

To get the current path of those folder (dev or app) use the following $_SESSION variable

$_SESSION['scriptcase']['appname']['glo_nm_path_prod']             Common Lib
$_SESSION['scriptcase']['appname']['glo_nm_path_imagens']          Image folder
$_SESSION['scriptcase']['appname']['glo_nm_path_imag_temp']        Temp folder
$_SESSION['scriptcase']['appname']['glo_nm_path_cache']            Cache folder
$_SESSION['scriptcase']['appname']['glo_nm_path_doc']              Doc folder

I usually capture them at Login and save them in global variable

I am finding some interesting things. I have a table to allow multiple uploads. The upload column is a blob or longblob. The field in SC is document/filename. I have allowed pdf, jpg, png, doc, docx. If I load a jpg or png, it displays correctly in the form. If I try to do a pdf, it shows a broken link.

Are there some rules of document/filename or image/filename I should be aware of?

I need to modify to say if I define as document/filename it allows pdf, opens it, but tells me it does not exist at the same time… If I define as image/filename it does not find pdfs at all.

PDF will be save in the Doc folder, not the image folder, it has to be document/filename

Perfect. You have been a great deal of help.