Uploading an image or other file types

By the way, absolutely loving the server. Been successfully returning web pages almost from day one. I have had few issues. Any way, is there a way to handle document uploads from a browser? If so, how?

I’ve been really happy with DropZone and all the customizing options it includes.

https://www.dropzonejs.com

Hi James, hope you have been well. Once the file is uploading how does Panorama X server handle the post with the file? Can Panorama X server distinguish between the regular form fields and the file data?

DropZone can be added to any HTML form. I have numerous Panorama templates that include it. But the upload runs separately from the form submission. I utilize a hidden field in the DropZone div with an ID number that matches any uploads to a record in the database. A PHP script I’ve written on the server processes the received file, moving it to a specified location, renaming it or what ever else fits the situation.

Using AJAX, the HTML form can be updated without being reloaded to show a list of uploads or , once again, whatever else fits the situation.

DropZone can be set to control the number of allowed uploads, the accepted file types, file sizes and a number of other options.

In the HTML form, I can include a cgi address for Panorama too, so an upload can be used to trigger Panorama actions. As I noted yesterday, DropZone is highly configurable and I’ve put it to numerous uses.

Is there a learning curve? Oh yeah.

Thank you for taking the time to answer the question. I probably could of asked the question in a much better way.

Any ways I was curious if Panorama could handle it all on its own rather than relying on php etc. I noticed last night that with version 10.2 there is a new statement, uploadfiletoserver that seems like it would do it but probably is not for a web interface.

Thank you for the DropZone tip.

A major part of uploading is on the browser side. How is a file selected and what are the limitations in type and size for instance. I can’t imagine how Panorama can handle that end of the process. The only uploads I know of use a lot of javascript and load files to a generic upload site on the server. PHP is consistently applied to locate and move the uploaded files to their desired location, along with numerous other potential tasks.

It might be possible to have Panorama take over on the server side instead of the PHP, but I’ve never given it a serious effort.

Panorama Server is for dynamic web pages only. It does not have anything to do with static files, either for downloading or uploading. I believe that is a feature of many web servers (for example Apache) but I have never done it so I’m not sure if you also need PHP or some other language running on the server.

That statement is used internally by Panorama for tasks like uploading a new shared database, new database generation, etc. It allows a Panorama client to upload to Panorama server. It does not work with web browsers.