Hi all,

We are converting a standard 4D web application to use Active4D and are
having trouble with what is probably a trivial task. This is most likely
just a case of not reading the manual correctly, but we have tried searching
it and cannot find a solution.

We need to provide a way for web users to download files so that they have
access to their files but to no others.

In the old application we provided URL links containing a call to a general
"download method" along with an index number. The download method used the
index to look up a record containing the corresponding file name. To send
the file back to the user we used 4D's "Open Document", "CLOSE DOCUMENT",
"DOCUMENT TO BLOB" and "SEND HTML BLOB" commands. This worked fine.


In the new version, we tried to do the equivalent with a "GetDocument.a4p"
page that used the equivalent Active4D commands (using "write blob" instead
of "SEND HTML BLOB").

The first problem we had was that Active4D's "Open Document" was not
finding/opening our files. It works fine when we access relative path names
(inside our web root) but not with absolute paths, so we suspect it is
something stupid we are doing with the "safe doc dirs" setting. The manual
indicates we need to start the path with a drive name. Based on my
understanding of examples in the manual, for testing purposes I tried
various settings such as the following, but to no avail...

safe doc dirs = /D
safe doc dirs = D:
safe doc dirs = D:/SomeFolder
safe doc dirs = "D:/SomeFolder"


Eventually we gave up and instead call a 4D method to find our file and
create our blob. We then let Active4D send the blob using "write blob". This
works fine except that we are now having a problem in that the file name
that the browser saves the file as is the same as our form processor page
(eg "GetDocument.a4p" instead of "SomeWordDoc.doc")



Running on...

Active4Dv3.0
4D2003.4
Windows served

Browser: MacIE and/or Safari



Cheers for any help

-Kevin Williams



_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Reply via email to