In my cards and scripts, loading files work fine by pressing the BROWSE button (I made a button for each upload and labelled it BROWSE). You click it and a file box comes up with the proper filters. Everything works great! However, when using the same card on the internet (a revlet), pressing the BROWSE button does nothing.
Is there some special procedure or syntax I have to follow to use file requesters from a revlet?
Here is my code:
=============================
# Start by getting the file to upload
local tFileForUpload, tFileName
answer file "Select a file to upload" with filter "Video Files,*.avi;*.mpg;*.mp4;*.mov;*.wmv"\
put it into tFileForUpload
# Get the name of the file for upload
set the itemdel to "/"
put the last item of tFileForUpload into tFileName
put empty into field "fldVidLink"
# Connect the start the upload
local tDestination
put "http://www." & "travelandworkusa.com" &FilePath &tFileName into tFieldDest
put "ftp://" & FTPUSER & ":" & FTPPASS & "@" & "ftp.travelandworkusa.com" &FilePath & tFileName into tDestination
libURLSetStatusCallback "uploadProgress", the long ID of me
put the long ID of me into progressmeter
libURLftpUploadFile tFileForUpload, tDestination, "uploadComplete"
put tFieldDest into field "fldVidLink"
end mouseUp
on uploadComplete pURL, pStatus
put "Status Update:" && pStatus && return after field "lblProgress"
end uploadComplete
on uploadProgress pURL, pStatus
put "Status Update:" && pStatus && return before field "lblProgress"
--set the thumbpos of sb "prgScrollBar" to progressmeter
end uploadProgress
=============================================
Anything wrong with this as it pertains to FTPing to the server from a local file - from the context of a revlet online?
Thanks.
Mike
EMERGENCY - file requester not working in a revlet!!!
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
EMERGENCY - file requester not working in a revlet!!!
Last edited by admin12 on Fri Jul 29, 2011 7:02 pm, edited 2 times in total.
Re: Weird one - load files locally from a revlet on the web
After going through it, it's the FILE REQUESTER that is not working for me. I can FTP fine. I included ALL the libraries in the stand alone settings, just in case.
So, does anyone know why the file requester would not come up in a revlet? How can I fix this - it's MAJOR for me to fix this.
Mike
So, does anyone know why the file requester would not come up in a revlet? How can I fix this - it's MAJOR for me to fix this.
Mike
Re: EMERGENCY - file requester not working in a revlet!!!
IT GETS WORSE!
In Internet Explorer, file browsers don't work, but they do in Opera, Safari and Firefox.
However, in Safari, I cannot seem to type anything into field boxes. So, I cannot login or add data. What's up with that?
In all of the browsers, the ftp commands don't work at all. Everything (except progress bar and loading a thumbnail into an image control) works perfectly both locally and in standalone.
This is killing me. Is this the web player's fault or mine?
At this point, I need help from Runrev. I spent tons of money and time and I am about to lose a BIG client if none of this works properly. I have till Sunday night to make it all work or I am screwed.
Mike
In Internet Explorer, file browsers don't work, but they do in Opera, Safari and Firefox.
However, in Safari, I cannot seem to type anything into field boxes. So, I cannot login or add data. What's up with that?
In all of the browsers, the ftp commands don't work at all. Everything (except progress bar and loading a thumbnail into an image control) works perfectly both locally and in standalone.
This is killing me. Is this the web player's fault or mine?
At this point, I need help from Runrev. I spent tons of money and time and I am about to lose a BIG client if none of this works properly. I have till Sunday night to make it all work or I am screwed.
Mike
Re: EMERGENCY - file requester not working in a revlet!!!
Hi Mike,
I'm sorry to tell you, but RevLets are no good for commercial projects. They are a nice extra at the very best.
The web plugin never worked well, particularly if any dialogs are involved. Your best option is to create your own file browser, which exists inside your own stack only. This would basically be a field containing the list of files in the defaultFolder. Double-clicking on a filename should hide the field and put the defaultFolder & "/" & fileName into a variable, ready for use by another script. Double-clicking on folder should set the defaultFolder to defaultFolder & "/" & folderName while displaying the list of files in that folder. Do not filter out .. as you will need it to navigate upwards in the file hierarchy.
Kind regards,
Mark
I'm sorry to tell you, but RevLets are no good for commercial projects. They are a nice extra at the very best.
The web plugin never worked well, particularly if any dialogs are involved. Your best option is to create your own file browser, which exists inside your own stack only. This would basically be a field containing the list of files in the defaultFolder. Double-clicking on a filename should hide the field and put the defaultFolder & "/" & fileName into a variable, ready for use by another script. Double-clicking on folder should set the defaultFolder to defaultFolder & "/" & folderName while displaying the list of files in that folder. Do not filter out .. as you will need it to navigate upwards in the file hierarchy.
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode