CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 File Upload to Dynamic Specified folder by user_file_dir from MySQL

Print topic Send  topic

Author Message
it--solutions


Posts: 24
Posted: 08/13/2015, 5:53 PM

The file upload component built in to CodeCharge is very frustrating if you want to do anything more than SIMPLE upload to a foldername.

What i am trying to do should be simple

I am referencing a hidden field called "filedir" which has a before show action and loads the directory info from my mysql database. eg ./CLIENTS/IT Solutions Pty Ltd/

I am attempting to make the File Upload File Folder Properties to execute ". (CCGetParam('filedir')) ."
to allow a dynamic directory based on that particular clients folder.
ive spent over 2 weeks on this and have not yet found any solution,

I have read nearly all other topics regarding file upload, i have not yet found any helpful with my particular issue.

:-(
View profile  Send private message
it--solutions


Posts: 24
Posted: 08/13/2015, 7:00 PM

The error i receive back from the browser is
Unable to upload the file specified in script - upload folder doesn't exist.
View profile  Send private message
eratech


Posts: 513
Posted: 08/19/2015, 6:18 AM

@it-solutions - I suspect the CCGetParam might be getting the value too late in the submit.

Try setting the fileupload location in the Before Show of the fileupload using the filedir->GetValue(), So it will be set before the form is set on the screen instead of getting it on submit.

Let me know how you go. I'd like to use something like this in a project I'm working on.

Cheers

Eric
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia
View profile  Send private message
robertmann

Posts: 104
Posted: 10/22/2015, 3:32 AM

I just implemented such a wonderful and simple file upload component I have to share.
It only requires 3 lines of HTML code without any forms. Plus a server script that will handle the uploaded files.
<script src="/Scripts/dropzone.js"></script>
<link rel="stylesheet" href="/Scripts/dropzone.css">
<div class="dropzone" action="/UploadHandler.php"></div>

It requires JavaScript code from http://www.dropzonejs.com/

_________________
Robert
View profile  Send private message
ccsminer

Posts: 119
Posted: 10/23/2015, 8:00 AM

Excellent job! :)

Quote robertmann:
I just implemented such a wonderful and simple file upload component I have to share.
It only requires 3 lines of HTML code without any forms. Plus a server script that will handle the uploaded files.
<script src="/Scripts/dropzone.js"></script>
<link rel="stylesheet" href="/Scripts/dropzone.css">
<div class="dropzone" action="/UploadHandler.php"></div>

It requires JavaScript code from http://www.dropzonejs.com/

View profile  Send private message
ccsminer

Posts: 119
Posted: 10/23/2015, 8:02 AM

What would it take to provide the capability to delete what was uploaded?

Quote ccsminer:
Excellent job! :)

Quote robertmann:
I just implemented such a wonderful and simple file upload component I have to share.
It only requires 3 lines of HTML code without any forms. Plus a server script that will handle the uploaded files.
<script src="/Scripts/dropzone.js"></script>
<link rel="stylesheet" href="/Scripts/dropzone.css">
<div class="dropzone" action="/UploadHandler.php"></div>

It requires JavaScript code from http://www.dropzonejs.com/


View profile  Send private message
robertmann

Posts: 104
Posted: 10/23/2015, 10:31 PM

I haven't done that yet on the server side, so right now files get uploaded to my server (and I handle this in ASP.NET/C#), while later I'll have to check somehow if users deleted them. Though I'd start by displaying "Remove" links for the users to visually delete files, by adding such setting in JavaScript:

<script src="/Scripts/dropzone.js"></script>  
<link rel="stylesheet" href="/Scripts/dropzone.css">  
<script>  
Dropzone.options.dZUpload = {  
        addRemoveLinks: true  
}  
</script>  
<div id="dZUpload" class="dropzone" action="/UploadHandler.php"></div>


_________________
Robert
View profile  Send private message
MichaelMcDonald

Posts: 638
Posted: 10/31/2015, 1:23 AM

Have you thought about directly editing the .php page for the record containing the file upload component to use the get parameter?

You can do it...


But from that point on CCS won't update that portion of the code automatically and therefore any other references for the form there...
_________________
Central Coast, NSW, Australia.

View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by UltraApps.com  and YesSoftware, Inc.