Files & Folders on a secure server
Moderators: LCNeil, heatherlaine, kevinmiller, elanorb
Files & Folders on a secure server
Hi all
I am using a secure server on GoDaddy to host my files. Therefore, in order to give access to my files, I need to create a "public link" to put into live code. Here is my question:
Option #1: Do I use the public link of the folder with the "/filename" attached on the end of the link? If so, do I include the "https://"? If not, what should the format be?
Option #2: Do I use the public link of the file itself?
I don't like Option #2 because it creates more problems when uploading the file and autogenerating the name of the file. If at all possible, I would much rather use option #1. But I am unclear as to how to format name of the link.
Also, do I still use - url ("file:" & "filename") - when referencing the file or something else?
Thanks!
Tom
I am using a secure server on GoDaddy to host my files. Therefore, in order to give access to my files, I need to create a "public link" to put into live code. Here is my question:
Option #1: Do I use the public link of the folder with the "/filename" attached on the end of the link? If so, do I include the "https://"? If not, what should the format be?
Option #2: Do I use the public link of the file itself?
I don't like Option #2 because it creates more problems when uploading the file and autogenerating the name of the file. If at all possible, I would much rather use option #1. But I am unclear as to how to format name of the link.
Also, do I still use - url ("file:" & "filename") - when referencing the file or something else?
Thanks!
Tom
Re: Files & Folders on a secure server
Just to make sure you know what I am doing,I am using a text file on the secure server to populate my data grid. Her is my code:
put url "https://name of secure server public link/filename.txt" into tData
set the itemDel to tab
repeat with x=1 to the number of lines in tData
put item 1 of line x of tData into tDataArray[x]["Month"]
put item 2 of line x of tData into tDataArray[x]["Date"]
put item 3 of line x of tData into tDataArray[x]["Book"]
put item 4 of line x of tData into tDataArray[x]["Description"]
end repeat
set the dgData of group "displayMenu" to tDataArray
When I had the same file located in my computer's documents file, the data grid populated fine. Now, however, I am getting a "404" message that the file was not found.
If I paste the same link in a web browser, I will receive the file downloaded to me automatically.
put url "https://name of secure server public link/filename.txt" into tData
set the itemDel to tab
repeat with x=1 to the number of lines in tData
put item 1 of line x of tData into tDataArray[x]["Month"]
put item 2 of line x of tData into tDataArray[x]["Date"]
put item 3 of line x of tData into tDataArray[x]["Book"]
put item 4 of line x of tData into tDataArray[x]["Description"]
end repeat
set the dgData of group "displayMenu" to tDataArray
When I had the same file located in my computer's documents file, the data grid populated fine. Now, however, I am getting a "404" message that the file was not found.
If I paste the same link in a web browser, I will receive the file downloaded to me automatically.
Re: Files & Folders on a secure server
Ok, not sure if anyone else is reading this, but just in case, I will post my solution which also comes with another problem:
-After speaking with several people at GoDaddy, I finally spoke with someone who told me that online storage at GoDaddy can't be used for accessible storage like I was doing (other people at GoDaddy said that it could). I need a server, not storage! Haha, good lesson
So, I signed up for On-Rev's server and am still encountering a problem. I used the code in the previous posts with the proper links and the folders (that hold the text file) in the "world" portion of the storage. However, only the first line of my text file is populating the first row of the data grid. Weird
I can't figure out why the entire text file isn't populating all of the appropriate rows of the data grid...ideas?
-After speaking with several people at GoDaddy, I finally spoke with someone who told me that online storage at GoDaddy can't be used for accessible storage like I was doing (other people at GoDaddy said that it could). I need a server, not storage! Haha, good lesson
So, I signed up for On-Rev's server and am still encountering a problem. I used the code in the previous posts with the proper links and the folders (that hold the text file) in the "world" portion of the storage. However, only the first line of my text file is populating the first row of the data grid. Weird
I can't figure out why the entire text file isn't populating all of the appropriate rows of the data grid...ideas?
Re: Files & Folders on a secure server
Hi Tom,
Apologies for the delayed reponse
Do you have an example text file on your go daddy storage that you could provide a link to?. If the text file is accessible, say via a web browser, then there should be no real reason that it cannot be accessed via LiveCode.
Also, could you supply a link to the text file on your on-rev storage as this will allow us to try and replicate the issue you are experiencing.
Kind Regards,
Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
-
Apologies for the delayed reponse
Do you have an example text file on your go daddy storage that you could provide a link to?. If the text file is accessible, say via a web browser, then there should be no real reason that it cannot be accessed via LiveCode.
Also, could you supply a link to the text file on your on-rev storage as this will allow us to try and replicate the issue you are experiencing.
Kind Regards,
Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
-
Re: Files & Folders on a secure server
Hi Neil
Attached is the file. Like I mentioned the first line shows up properly in the row (I made a custom template) in my data grid form (not a table).
Here is my code:
The url above is the correct url I am trying to connect to...
Attached is the file. Like I mentioned the first line shows up properly in the row (I made a custom template) in my data grid form (not a table).
Here is my code:
Code: Select all
set the dgData of group "displayMenu" to empty
put url "urllinktofile" into tData
set the itemDel to tab
repeat with x=1 to the number of lines in tData
put item 1 of line x of tData into tDataArray[x]["Month"]
put item 2 of line x of tData into tDataArray[x]["Date"]
put item 3 of line x of tData into tDataArray[x]["Book"]
put item 4 of line x of tData into tDataArray[x]["Description"]
end repeat
set the dgData of group "displayMenu" to tDataArray
Re: Files & Folders on a secure server
Hi Tom,
Can I just double check that file attached to the reply ok as I can't seem to see it?
If you have trouble attaching then please forward the file to my email- neil@runrev.com
In regards to the url links, I cant seem to see them either. Please post them in a new reply and I will look into them also.
Kind Regards,
Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
--
Can I just double check that file attached to the reply ok as I can't seem to see it?
If you have trouble attaching then please forward the file to my email- neil@runrev.com
In regards to the url links, I cant seem to see them either. Please post them in a new reply and I will look into them also.
Kind Regards,
Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
--
Re: Files & Folders on a secure server
I sent the file to you via email. I didn't include the url because the forum said I don't have permission to do so. I will send that via email as well. Thanks!
Re: Files & Folders on a secure server
Hi Tom,
Thank for supplying the test link and text file.
I managed to replicate the issue you were experiencing and it would seem that it was a text file formatting issue that was causing only a single line to be populated in the datagrid.
If you visit the link to your text file (http://lifetree.on-rev.com/3M4G/3M4GInf ... tArray.txt) and view the page source you will notice that it is displayed as one single line of text. This explains why only one line is being generated on the datagrid. By default a carriage return is what the default lineDelimiter is set too.
As this is the case, I recreated your text file in a new plain text document and uploaded it to here http://techsupport.on-rev.com/Untitled.txt. When this is used, your datagrid will populate as expected.
I have attached this updated text file for your reference.
Kind Regards,
Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
--
Thank for supplying the test link and text file.
I managed to replicate the issue you were experiencing and it would seem that it was a text file formatting issue that was causing only a single line to be populated in the datagrid.
If you visit the link to your text file (http://lifetree.on-rev.com/3M4G/3M4GInf ... tArray.txt) and view the page source you will notice that it is displayed as one single line of text. This explains why only one line is being generated on the datagrid. By default a carriage return is what the default lineDelimiter is set too.
As this is the case, I recreated your text file in a new plain text document and uploaded it to here http://techsupport.on-rev.com/Untitled.txt. When this is used, your datagrid will populate as expected.
I have attached this updated text file for your reference.
Kind Regards,
Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
--
Re: Files & Folders on a secure server
Thanks, Neil! I will look at it now.
The immediate question comes to mind, why would the file have changed to read as one line? When I used this file stored on my computer (in my Documents folder), it read just fine. However, after I uploaded it to my on-rev account, that is when it stopped reading properly. Don't understand that...
The immediate question comes to mind, why would the file have changed to read as one line? When I used this file stored on my computer (in my Documents folder), it read just fine. However, after I uploaded it to my on-rev account, that is when it stopped reading properly. Don't understand that...
Re: Files & Folders on a secure server
Ok, I looked at your file and my file. When I open them up in Safari, they both display the same. In fact they look just like my original text file still on my computer. So, I am confused. I don't understand where you are seeing that the text file on my hosting is being displayed as a single line.
I want to understand so I can see this in the future if it happens again.
Look forward to hearing form you!
I want to understand so I can see this in the future if it happens again.
Look forward to hearing form you!
Re: Files & Folders on a secure server
Sorry, I'm a beginner here so I apologize for these revised posts I keep sending...
I figured out the source code. I just went to Google Chrome and saw the code. I couldn't figure out how to do that in Safari (if anyone knows how, let me know!) I saw how the line was just a continuous line but still don't understand how that happened.
I created the text file using Livecode. I followed Elanor's instructions and the file created great! It also displayed accurately (as I have mentioned before), when I housed the text file in my computer's Documents folder. So, here is the question, how do I get this not to happen? How do I make sure Livecode creates the form accurately using the return line breaks? (I do use the "return" command in the card's code)
I figured out the source code. I just went to Google Chrome and saw the code. I couldn't figure out how to do that in Safari (if anyone knows how, let me know!) I saw how the line was just a continuous line but still don't understand how that happened.
I created the text file using Livecode. I followed Elanor's instructions and the file created great! It also displayed accurately (as I have mentioned before), when I housed the text file in my computer's Documents folder. So, here is the question, how do I get this not to happen? How do I make sure Livecode creates the form accurately using the return line breaks? (I do use the "return" command in the card's code)
Re: Files & Folders on a secure server
Hi Tom,
I've had a look at the writingToFile stack that Elanor created and although this is writing the text file correctly and it this displays correctly when running on the desktop environment, it seems that there is a possible bug that is causing carriage returns to be stripped when read from an online directory. The bug seems to affect text files created on Mac OSX as text files created on Windows do not have this problem.
The following is an example created on windows with Elanors stack, and you will see that it displays correctly in both the text file and page source-
http://techsupport.on-rev.com/weatherData.txt
I will need to investigate this further. Once I have done this, I will report back to here with my findings.
Kind Regards,
Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
-
I've had a look at the writingToFile stack that Elanor created and although this is writing the text file correctly and it this displays correctly when running on the desktop environment, it seems that there is a possible bug that is causing carriage returns to be stripped when read from an online directory. The bug seems to affect text files created on Mac OSX as text files created on Windows do not have this problem.
The following is an example created on windows with Elanors stack, and you will see that it displays correctly in both the text file and page source-
http://techsupport.on-rev.com/weatherData.txt
I will need to investigate this further. Once I have done this, I will report back to here with my findings.
Kind Regards,
Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
-