FoxInCloud
Re: New awcntgetfile function
We'll soon release V 1.40 beta 2 which should fix this issue
Thanks
The first time i load the form that contains the control no problem. If i close the form and in a second time i call it again i have this error:
You'll find more documentation in
MODIFY CLASS awImgGetFile OF aw.vcx METHOD wcGetFileSWFimageURLGet
please note that if you need upload progress bar, you should use aw.vcx!awCntGetFile
Thanks. It works.
Now the only problem i have is to call the upload operation from a button and not from an image...
xxxProcess.FileUpload_cFullPath() should return a full path
try
* ------------------------------------------------------------PROTECTEDFUNCTION FileUpload_cFullPath && {en} Address where File received by upload shall be stored {fr} Adresse où enregistrer un fichier reçu par uploadLPARAMETERS ; tcFile,; && {en} File Name from web user's computer {fr} Nom du fichier tel qu'il existe sur l'ordinateur de l'utilisateur Web tcFileType && {en} File Type either supplied by aw.vcx!aw???GetFile.wcGetFileType or defaulted by acData.prg!cFolderWeb() based on JustExt(m.tcFile) {fr} Type de fichier: soit fourni par aw.vcx!aw???GetFile.wcGetFileType ou déterminé par acData.prg!cFolderWeb() selon JustExt(m.tcFile) RETURN'd:\upload\' + m.tcFile
PROTECTED FUNCTION FileUpload_cFullPath
Return "d:\upload"
The result is that the file is in the temp folder (of my application root)
please post the values and code you use, and the result you get
thanks
I tried to set this.wcGetFileFolder but every value i insert it uses always the extension folder...i use xxxProcess.FileUpload_cFullPath() and it uses Temp folder....
I need to save the files in the Upload folder in my application folder....which value do i have to insert ?
also described in documentation
{en} Where Server will store the uploaded file: {en} -------------------- {en} Important {en} -------------------- {en} Applicable rules are, in order of precedence: {en} If you specify this.wcGetFileFolder and/or implement this.wcGetFileFolderGet(), file will be stored at this location {en} If you implement xxxProcess.FileUpload_cFullPath(), file will be stored in the location returned by this method {en} If you specify this.wcGetFileType and/or implement this.wcGetFileTypeGet(), file will be stored in a folder named accordingly under Application's root folder {en} Otherwise, file will be stored in the folder name returned by acData.prg!cFolderWeb() according to file's extension, under Application's root folder {en} > Make sure your application has the right to create file at the resulting location - check user account under which your application executes {en} ----------------------------------------------------
The uploaded files are saved in different folders depending on the file type. How can i know the folder where these files are saved ? or can i save them in the same folder ?
I have to move the uploaded file in my ERP special folder and use it as attachment of recorded records...
Hi Michele,
What is unclear to you in this?
{en} Adaptation: {en} -------------------- {en} Important {en} -------------------- {en} A/ Replace any control that issues GetFile() with an instance of this class {en} The recommend process is: {en} 1- add an instance of this class to your form or your class library {en} 2- copy and paste code from the existing class or object into the new instance {en} 3- delete the existing (former) class or object {en} 4- rename the new instance like the former class or object {en} 5- if your former class is in a .vcx has a different base class, change base class in *.?cx using it: {en} USE *.?cx {en} REPLACE BaseClass WITH ... FOR CLASS = ... AND CLASSLIB = ... {en} C/ Review and implement this.wcGetFile* properties and methods you see fit {en} B/ Callback: {en} Any code processing the uploaded file needs be moved to a call-back method {en} the standard call-back method is: this.wFormCallBack() {en} To use another method of this object, specify its name in this.wcGetFileCallBack, {en} and/or override this.wcGetFileCallBackGet() {en} Review code sample in aw.vcx!awImgGetFile::wFormCallBack() {en} ====================================================
I read it ! but i don't understand all.
Can i call it from a button and not in the image ?
MODIFY CLASS awImgGetFile OF aw.vcx METHOD wreadme
How does it work ? I need to upload a file and save it in a defined folder on the server-
Thierry Nivelet (FoxInCloud)
Never explain, never complain (Queen Elizabeth II)