How to upload files from the website to the server? Anyone knows a script that rally wordks?
Author: Otto Pietersen
Visited 2211,
Followers 1,
Shared 0
I want users of my website to be able to upload files (residing on their computer) to the server. I think for example
that a php script, to be installed in a "html object", may do the job. I'm using the pro-version.
Has someone any suggestion?
Posted on the
Hello Otto
You have yourself given one solution. Before we can suggest something different and maybe better, you have to tell some more about what it should be used for.
Is it for all to upload or only for some members?
What file-fypes are we talking about? image files or all files?
Should the uploaded be accessible for all, or only for some?
A small description of what it is intended for, please.
Kind regards
John S.
Otto, you can create a contact form with the option to attach files. See this page on our website for an example. I don't know if that's quite what you're looking for, however. Perhaps you're looking for something more like file sharing, where person A can upload a file and person B can access it. The contact form of course won't do that directly. If you go that route, you'd receive an email with the file attached. You might be able to write a scrpt to automatically extract attachments and upload them to your server (I don't do scripting, so I really have no idea). But otherwise, if you're looking for general file sharing, I'd suggest going with something like Dropbox, Google Drive, One Drive, or iCloud.
Author
Hello John S.
The idea is that an (authorized) user of the website can upload a pdf file (<100kb, with known filename) on a directory of the website, which eventually can be read by any other user. Once the file is uploaded to a specific directory, I could make a link to it from within e.g. a text object.
The site is a site of our golfclub. The file will comprise for example a listing of persons who will have certain tasks to execute on the golfclub. The list is changing quite often, so it would be very convenient if it is not only me which can upload it.
I think the authorization can be made in X5 by a restricted page from where the uploading can take place.
Kind regards,
Otto
Hi Otto.
Through a form accessible only in a reserved page, I believe you could achieve the upload part.
As far as the "reading the file" part is concerned instead, I'm afraid that is something that will required custom code to be added.
What about the PDF file object? You could make use of an external Drive account to edit a specific file and present it through the website. This way, whatever authorized user could access it and present it online.
If you need to rely on WebSite's users instead, why not make it with a Dynamic Content object? It would be editable only by selected users.
Let me know what you think
Thank you
Stefano
Hello Otto
I would suggest you to take a look at the free ADMIDIO member system.
https://www.admidio.org/
With this system you can set up a user or group of users to have rights for upload.
And you can also set access rights to folders for a user or group of users to access the files.
The ADMIDIO system take care of all the needed security. You can use only this part of the system, but you also have a possibility to make a photo album where you can restrict access for users.
And there is the possibility to create events/dates, where you can have members participate for events. It could be a party in the club, or it could be a tour to a match with another club.
You can test the system on their demo site.
You can integrate the system into X5 by using iframes or links.
'You can see an example I have made here : http://c4dshow.com/3d-figuren.html
To the left you can choose different types as : http://c4dshow.com/animals.html
If you scroll down you can see some free material you can download. If the material is not free you are not allowed to download it. This is controlled by the ADMIDIO system.
In the same way you can make PDF files awailable for users and allow some users to upload the material.
Hope you are inspired by this.
Kind regards
John S.