Download file Excel or Word

I need to download files excel or word with scriptcase
How do I do it?
Thanks !

Re: Download file Excel or Word

In a form app:

Create a new field, set Data Type to Document (file name) and it will create the result you are looking for. You can store the file to a blob file using Document (database) if you want as well.

In thinking about this… this is for upload to the server. If you want to download from the server, you may have to create PHP function and not rely on SC. There are many examples on the net about this topic.

but … If you use SC to upload, then you use SC to download the file if the provided link created by the upload will allow another to then download I believe.

If this does not cover your question, please be more specific.

Regards,
Scott.

Re: Download file Excel or Word

Thanks ! … Please send to me Examples !

Where is ?

Re: Download file Excel or Word

Your answer is very informantive scott.
but i want to know if you know how
to download the file with file extension.
i’m successfully upload the file in database but when
i download it. it has no file extension.,
Your great scott.
Thank YOu so much in Advance.

Re: Download file Excel or Word

The disadvantage of storing a file in a table/field is that you have to remember the type yourself.
-Store the file type in a extra field and append it to the download so the browser will see the extension and act accordingly
-Open the file after download and auto detect the format from the file header using code.

The other option is to store the file in a directory instead of a field, and the browser will take it from there.

Regards,
Scott.

Re: Download file Excel or Word

thank you for a good answer.
i didnt thought that when it is saved in blob the file type in removed.
btw thank for reply.

saving file in folder in not good when uploading because
it cause an error in linux server although the permission is set right.

regard,
ghulma