Uploading a file

classic Classic list List threaded Threaded
26 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Uploading a file

Patrick Larkin-2
Can someone point me in the direction of how to go about writing a page that allows the user to upload a file, enter the date, enter a file description and have everything magically link up on a Lasso page?

I see lots of stuff about the File tags but I don't know where to even begin.  I suppose once I get the file on the server, I'll be able to accomplish the other things.


Patrick Larkin
Developer/Administrator of Special Systems / Webmaster
Bethlehem Area School District





--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: Uploading a file

Viaduct Productions
You'll have to explain what you mean by link up.

The file will get saved, given a record in a table.  Same with a date, maybe the same table, I don't know.  Same with the description.  

If they are all inside a table somewhere, they can be brought back up, as you can get the new keyfield_id for the generated record.  


On 2010-03-02, at 2:43 PM, Patrick Larkin wrote:

> Can someone point me in the direction of how to go about writing a page that allows the user to upload a file, enter the date, enter a file description and have everything magically link up on a Lasso page?



_____________
Rich in Toronto


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: Uploading a file

Patrick Larkin-2
Sorry, I just found the section in the manual for uploads...

I need a secretary to upload a PDF, enter a date (which is not necessarily today's date), and enter a description.  These can all be select lists.  

I presume I can have a lasso page that will perform the upload and insert the two pieces of data into a table.  I just don't know how to do the upload part.  It appears it goes into /var/tmp?  After it is uploaded, I need to have Lasso move it immediately so that the link I generate based on the two data elements entered will work.


Patrick Larkin
Developer/Administrator of Special Systems / Webmaster
Bethlehem Area School District




On Mar 2, 2010, at 2:52 PM, Viaduct Productions wrote:

> You'll have to explain what you mean by link up.
>
> The file will get saved, given a record in a table.  Same with a date, maybe the same table, I don't know.  Same with the description.  
>
> If they are all inside a table somewhere, they can be brought back up, as you can get the new keyfield_id for the generated record.  
>
>
> On 2010-03-02, at 2:43 PM, Patrick Larkin wrote:
>
>> Can someone point me in the direction of how to go about writing a page that allows the user to upload a file, enter the date, enter a file description and have everything magically link up on a Lasso page?
>
>
>
> _____________
> Rich in Toronto
>
>
> --
> This list is a free service of LassoSoft: http://www.LassoSoft.com/
> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
> Manage your subscription: http://www.ListSearch.com/Lasso/
>
>
>


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: Uploading a file

Viaduct Productions

On 2010-03-02, at 3:04 PM, Patrick Larkin wrote:

> I presume I can have a lasso page that will perform the upload and insert the two pieces of data into a table.  I just don't know how to do the upload part.  It appears it goes into /var/tmp?  After it is uploaded, I need to have Lasso move it immediately so that the link I generate based on the two data elements entered will work.

Quick rundown (all in the file uploads section):

file goes into /var/tmp/, and stays there until your receiving lasso page ends, then it vanishes.  During that time, you use file_uploads tag (container tag) to save it somewhere.  Read that section.  

The link is essentially generated to that file.  You might have to rename it something unique, so think about that one.  Otherwise you'll have errors or might be overwriting previous files.  



_____________
Rich in Toronto


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: Uploading a file

Patrick Larkin-2
Thanks.  I think I'm going to have to spend some time resolving these permissions issues.  Ugh.

Patrick Larkin
Developer/Administrator of Special Systems / Webmaster
Bethlehem Area School District




On Mar 2, 2010, at 3:10 PM, Viaduct Productions wrote:

>
> On 2010-03-02, at 3:04 PM, Patrick Larkin wrote:
>
>> I presume I can have a lasso page that will perform the upload and insert the two pieces of data into a table.  I just don't know how to do the upload part.  It appears it goes into /var/tmp?  After it is uploaded, I need to have Lasso move it immediately so that the link I generate based on the two data elements entered will work.
>
> Quick rundown (all in the file uploads section):
>
> file goes into /var/tmp/, and stays there until your receiving lasso page ends, then it vanishes.  During that time, you use file_uploads tag (container tag) to save it somewhere.  Read that section.  
>
> The link is essentially generated to that file.  You might have to rename it something unique, so think about that one.  Otherwise you'll have errors or might be overwriting previous files.  
>
>
>
> _____________
> Rich in Toronto
>
>
> --
> This list is a free service of LassoSoft: http://www.LassoSoft.com/
> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
> Manage your subscription: http://www.ListSearch.com/Lasso/
>
>
>


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: Uploading a file

Rick Draper
> I think I'm going to have to spend some time resolving these
permissions issues.

A really good resource can be found here, thanks to Steve...

http://stevepiercy.com/lasso_stuff/file_perms.lasso

Very best regards,
 
 
Rick

--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: Uploading a file

dguardiola
In reply to this post by Patrick Larkin-2

Le 2 mars 10 à 21:22, Patrick Larkin a écrit :

> Thanks.  I think I'm going to have to spend some time resolving  
> these permissions issues.  Ugh.

simply wrap your code between
[inline(-user=xxxxx,-password)]

...your upload treatment code...

[/inline]

with credentials of a lasso user with write access

for the folder where you want to copy the file, check that it has the  
group "staff" (if you happen to be on Mac and have this group listed  
in user permissions) with write access
I use a freeware called BatchMod for setting the permissions easily.

you should also, as Rich said, use a custom tag to convert the  
filename to something safe (without accents, spaces and gremlins) I  
have a simple one here if you need it

then save the filename in your table and you'll be able to provide a  
link to the file

hope this helps



>
> Patrick Larkin
> Developer/Administrator of Special Systems / Webmaster
> Bethlehem Area School District
>
>
>
>
> On Mar 2, 2010, at 3:10 PM, Viaduct Productions wrote:
>
>>
>> On 2010-03-02, at 3:04 PM, Patrick Larkin wrote:
>>
>>> I presume I can have a lasso page that will perform the upload and  
>>> insert the two pieces of data into a table.  I just don't know how  
>>> to do the upload part.  It appears it goes into /var/tmp?  After  
>>> it is uploaded, I need to have Lasso move it immediately so that  
>>> the link I generate based on the two data elements entered will  
>>> work.
>>
>> Quick rundown (all in the file uploads section):
>>
>> file goes into /var/tmp/, and stays there until your receiving  
>> lasso page ends, then it vanishes.  During that time, you use  
>> file_uploads tag (container tag) to save it somewhere.  Read that  
>> section.
>>
>> The link is essentially generated to that file.  You might have to  
>> rename it something unique, so think about that one.  Otherwise  
>> you'll have errors or might be overwriting previous files.
>>
>>
>>
>> _____________
>> Rich in Toronto
>>
>>
>> --
>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>
>>
>>
>
>
> --
> This list is a free service of LassoSoft: http://www.LassoSoft.com/
> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
> Manage your subscription: http://www.ListSearch.com/Lasso/
>
>

--
Dominique Guardiola, QUINODE
http://www.quinode.fr/
• Tel : 04.27.86.84.37
• GSM : 06.15.13.22.27





--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: Uploading a file

stevepiercy
In reply to this post by Patrick Larkin-2
There is a code sample on my guide (which will also help with
the file perms) that does the upload part.  Start with that and
add your other fields.

http://stevepiercy.com/lasso_stuff/file_perms.lasso

--steve


On 3/2/10 at 3:04 PM, [hidden email] (Patrick Larkin) pronounced:

>Sorry, I just found the section in the manual for uploads...
>
>I need a secretary to upload a PDF, enter a date (which is not
>necessarily today's date), and enter a description.  These can
>all be select lists.
>I presume I can have a lasso page that will perform the upload
>and insert the two pieces of data into a table.  I just don't
>know how to do the upload part.  It appears it goes into
>/var/tmp?  After it is uploaded, I need to have Lasso move it
>immediately so that the link I generate based on the two data
>elements entered will work.
>
>
>Patrick Larkin
>Developer/Administrator of Special Systems / Webmaster
>Bethlehem Area School District
>
>
>
>
>On Mar 2, 2010, at 2:52 PM, Viaduct Productions wrote:
>
>>You'll have to explain what you mean by link up.
>>
>>The file will get saved, given a record in a table.  Same with a date, maybe the
>same table, I don't know.  Same with the description.
>>
>>If they are all inside a table somewhere, they can be brought back up, as you can
>get the new keyfield_id for the generated record.
>>
>>
>>On 2010-03-02, at 2:43 PM, Patrick Larkin wrote:
>>
>>> Can someone point me in the direction of how to go about writing a page that
>allows the user to upload a file, enter the date, enter a file
>description and have everything magically link up on a Lasso page?
>>
>>
>>
>>_____________
>>Rich in Toronto
>>
>>
>>--
>>This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>Manage your subscription: http://www.ListSearch.com/Lasso/
>>
>>
>>
>
>
>--
>This list is a free service of LassoSoft: http://www.LassoSoft.com/
>Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>Manage your subscription: http://www.ListSearch.com/Lasso/
>
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: Uploading a file

Patrick Larkin-2
In reply to this post by Patrick Larkin-2
Thanks for all the responses!  I followed the document written by Steve Piercy to the T.  

I wrote the upload HTML page and the response page just has:

[inline(-user='username',-password='password')]
               
[file_processUploads:-Destination='/docs/upload/',-FileOverWrite]

[/inline]


Where username=the user in the group given permissions to the upload directory defined (/docs/upload/).

I changed the group of the this directory to "staff" and it already had rwx for the group.  

Alas, I still get the same error I have gotten all along:


No permission to access uploaded files.
at: ProcessUploads with params: -Destination='/docs/upload/', -FileOverWrite
at: /docs/upload/response.lasso with params: '-upload.realname'='100208_Supt.pdf', '-upload.name'='/var/tmp/lasso-tmpqNin5I83204970.uld', '-upload.type'='application/pdf', '-upload.size'='52139', '-upload.fieldname'='upload', '-upload2.fieldname'='upload' on line: 15 at position: 2
at: inline with params: -user='username', -password=*****
at: /docs/upload/response.lasso with params: '-upload.realname'='100208_Supt.pdf', '-upload.name'='/var/tmp/lasso-tmpqNin5I83204970.uld', '-upload.type'='application/pdf', '-upload.size'='52139', '-upload.fieldname'='upload', '-upload2.fieldname'='upload'



Help?

Patrick Larkin
Developer/Administrator of Special Systems / Webmaster
Bethlehem Area School District




On Mar 2, 2010, at 3:22 PM, Patrick Larkin wrote:

> Thanks.  I think I'm going to have to spend some time resolving these permissions issues.  Ugh.
>
> Patrick Larkin
> Developer/Administrator of Special Systems / Webmaster
> Bethlehem Area School District
>
>
>
>
> On Mar 2, 2010, at 3:10 PM, Viaduct Productions wrote:
>
>>
>> On 2010-03-02, at 3:04 PM, Patrick Larkin wrote:
>>
>>> I presume I can have a lasso page that will perform the upload and insert the two pieces of data into a table.  I just don't know how to do the upload part.  It appears it goes into /var/tmp?  After it is uploaded, I need to have Lasso move it immediately so that the link I generate based on the two data elements entered will work.
>>
>> Quick rundown (all in the file uploads section):
>>
>> file goes into /var/tmp/, and stays there until your receiving lasso page ends, then it vanishes.  During that time, you use file_uploads tag (container tag) to save it somewhere.  Read that section.  
>>
>> The link is essentially generated to that file.  You might have to rename it something unique, so think about that one.  Otherwise you'll have errors or might be overwriting previous files.  
>>
>>
>>
>> _____________
>> Rich in Toronto
>>
>>
>> --
>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>
>>
>>
>
>
> --
> This list is a free service of LassoSoft: http://www.LassoSoft.com/
> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
> Manage your subscription: http://www.ListSearch.com/Lasso/
>
>
>


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: Uploading a file

stevepiercy
What did my original code samples indicate in testing?

--steve


On 3/3/10 at 9:45 AM, [hidden email] (Patrick Larkin) pronounced:

>Thanks for all the responses!  I followed the document written
>by Steve Piercy to the T.
>I wrote the upload HTML page and the response page just has:
>
>[inline(-user='username',-password='password')]
>[file_processUploads:-Destination='/docs/upload/',-FileOverWrite]
>[/inline]
>
>
>Where username=the user in the group given permissions to the
>upload directory defined (/docs/upload/).
>
>I changed the group of the this directory to "staff" and it
>already had rwx for the group.
>Alas, I still get the same error I have gotten all along:
>
>
>No permission to access uploaded files.
>at: ProcessUploads with params: -Destination='/docs/upload/', -FileOverWrite
>at: /docs/upload/response.lasso with params:
>'-upload.realname'='100208_Supt.pdf',
>'-upload.name'='/var/tmp/lasso-tmpqNin5I83204970.uld',
>'-upload.type'='application/pdf', '-upload.size'='52139',
>'-upload.fieldname'='upload', '-upload2.fieldname'='upload' on
>line: 15 at position: 2
>at: inline with params: -user='username', -password=*****
>at: /docs/upload/response.lasso with params:
>'-upload.realname'='100208_Supt.pdf',
>'-upload.name'='/var/tmp/lasso-tmpqNin5I83204970.uld',
>'-upload.type'='application/pdf', '-upload.size'='52139',
>'-upload.fieldname'='upload', '-upload2.fieldname'='upload'
>
>
>
>Help?
>
>Patrick Larkin
>Developer/Administrator of Special Systems / Webmaster
>Bethlehem Area School District
>
>
>
>
>On Mar 2, 2010, at 3:22 PM, Patrick Larkin wrote:
>
>>Thanks.  I think I'm going to have to spend some time resolving these permissions
>issues.  Ugh.
>>
>>Patrick Larkin
>>Developer/Administrator of Special Systems / Webmaster
>>Bethlehem Area School District
>>
>>
>>
>>
>>On Mar 2, 2010, at 3:10 PM, Viaduct Productions wrote:
>>
>>>   On 2010-03-02, at 3:04 PM, Patrick Larkin wrote:
>>>
>>>> I presume I can have a lasso page that will perform the upload and insert the
>two pieces of data into a table.  I just don't know how to do
>the upload part.  It appears it goes into /var/tmp?  After it
>is uploaded, I need to have Lasso move it immediately so that
>the link I generate based on the two data elements entered will work.
>>>   Quick rundown (all in the file uploads section):
>>>   file goes into /var/tmp/, and stays there until your
>>>receiving lasso page ends,
>then it vanishes.  During that time, you use file_uploads tag
>(container tag) to save it somewhere.  Read that section.
>>>   The link is essentially generated to that file.  You might
>>>have to rename it
>something unique, so think about that one.  Otherwise you'll
>have errors or might be overwriting previous files.
>>>     _____________
>>> Rich in Toronto
>>>    --
>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>  
>>
>>
>>--
>>This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>Manage your subscription: http://www.ListSearch.com/Lasso/
>>
>>
>>
>
>
>--
>This list is a free service of LassoSoft: http://www.LassoSoft.com/
>Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>Manage your subscription: http://www.ListSearch.com/Lasso/
>
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: Uploading a file

Rick Draper
In reply to this post by Patrick Larkin-2

Are certain that you have the path permissions set in Server Admin and
assigned to the user in Site Admin?

Very best regards,

Rick

-----Original Message-----
From: Lasso Talk [mailto:[hidden email]] On Behalf Of Patrick
Larkin
Sent: March 3, 2010 9:45 AM
To: Lasso Talk
Subject: Re: Uploading a file

Thanks for all the responses!  I followed the document written by Steve
Piercy to the T.  

I wrote the upload HTML page and the response page just has:

[inline(-user='username',-password='password')]
               
[file_processUploads:-Destination='/docs/upload/',-FileOverWrite]


[/inline]


Where username=the user in the group given permissions to the upload
directory defined (/docs/upload/).

I changed the group of the this directory to "staff" and it already had
rwx for the group.  

Alas, I still get the same error I have gotten all along:


No permission to access uploaded files.
at: ProcessUploads with params: -Destination='/docs/upload/',
-FileOverWrite
at: /docs/upload/response.lasso with params:
'-upload.realname'='100208_Supt.pdf',
'-upload.name'='/var/tmp/lasso-tmpqNin5I83204970.uld',
'-upload.type'='application/pdf', '-upload.size'='52139',
'-upload.fieldname'='upload', '-upload2.fieldname'='upload' on line: 15
at position: 2
at: inline with params: -user='username', -password=*****
at: /docs/upload/response.lasso with params:
'-upload.realname'='100208_Supt.pdf',
'-upload.name'='/var/tmp/lasso-tmpqNin5I83204970.uld',
'-upload.type'='application/pdf', '-upload.size'='52139',
'-upload.fieldname'='upload', '-upload2.fieldname'='upload'



Help?

Patrick Larkin
Developer/Administrator of Special Systems / Webmaster Bethlehem Area
School District


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: Uploading a file

Patrick Larkin-2
In reply to this post by stevepiercy
The first test returned:  I Lasso, therefore I am.

The second test I wasn't sure what I was supposed to edit and with what.  I changed the username and password.  Is 'destpath' the path I defined in Step 2?  Should it be in quotes?  Not sure what to do with filename.  In this test, I get:

file_create error: Operation not permitted


Patrick Larkin
Developer/Administrator of Special Systems / Webmaster
Bethlehem Area School District




On Mar 3, 2010, at 9:48 AM, Steve Piercy - Web Site Builder wrote:

> What did my original code samples indicate in testing?
>
> --steve
>
>
> On 3/3/10 at 9:45 AM, [hidden email] (Patrick Larkin) pronounced:
>
>> Thanks for all the responses!  I followed the document written by Steve Piercy to the T.
>> I wrote the upload HTML page and the response page just has:
>>
>> [inline(-user='username',-password='password')]
>> [file_processUploads:-Destination='/docs/upload/',-FileOverWrite]
>> [/inline]
>>
>>
>> Where username=the user in the group given permissions to the upload directory defined (/docs/upload/).
>>
>> I changed the group of the this directory to "staff" and it already had rwx for the group.
>> Alas, I still get the same error I have gotten all along:
>>
>>
>> No permission to access uploaded files.
>> at: ProcessUploads with params: -Destination='/docs/upload/', -FileOverWrite
>> at: /docs/upload/response.lasso with params: '-upload.realname'='100208_Supt.pdf', '-upload.name'='/var/tmp/lasso-tmpqNin5I83204970.uld', '-upload.type'='application/pdf', '-upload.size'='52139', '-upload.fieldname'='upload', '-upload2.fieldname'='upload' on line: 15 at position: 2
>> at: inline with params: -user='username', -password=*****
>> at: /docs/upload/response.lasso with params: '-upload.realname'='100208_Supt.pdf', '-upload.name'='/var/tmp/lasso-tmpqNin5I83204970.uld', '-upload.type'='application/pdf', '-upload.size'='52139', '-upload.fieldname'='upload', '-upload2.fieldname'='upload'
>>
>>
>>
>> Help?
>>
>> Patrick Larkin
>> Developer/Administrator of Special Systems / Webmaster
>> Bethlehem Area School District
>>
>>
>>
>>
>> On Mar 2, 2010, at 3:22 PM, Patrick Larkin wrote:
>>
>>> Thanks.  I think I'm going to have to spend some time resolving these permissions
>> issues.  Ugh.
>>>
>>> Patrick Larkin
>>> Developer/Administrator of Special Systems / Webmaster
>>> Bethlehem Area School District
>>>
>>>
>>>
>>>
>>> On Mar 2, 2010, at 3:10 PM, Viaduct Productions wrote:
>>>
>>>>  On 2010-03-02, at 3:04 PM, Patrick Larkin wrote:
>>>>
>>>>> I presume I can have a lasso page that will perform the upload and insert the
>> two pieces of data into a table.  I just don't know how to do the upload part.  It appears it goes into /var/tmp?  After it is uploaded, I need to have Lasso move it immediately so that the link I generate based on the two data elements entered will work.
>>>>  Quick rundown (all in the file uploads section):
>>>>  file goes into /var/tmp/, and stays there until your receiving lasso page ends,
>> then it vanishes.  During that time, you use file_uploads tag (container tag) to save it somewhere.  Read that section.
>>>>  The link is essentially generated to that file.  You might have to rename it
>> something unique, so think about that one.  Otherwise you'll have errors or might be overwriting previous files.
>>>>    _____________
>>>> Rich in Toronto
>>>>   --
>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>  
>>>
>>>
>>> --
>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>
>>>
>>>
>>
>>
>> --
>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>
>>
>
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> Steve Piercy               Web Site Builder               Soquel, CA
> <[hidden email]>                  <http://www.StevePiercy.com/>
>
>
> --
> This list is a free service of LassoSoft: http://www.LassoSoft.com/
> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
> Manage your subscription: http://www.ListSearch.com/Lasso/
>
>
>


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: Uploading a file

Patrick Larkin-2
An addendum.

The second script works fine.  The group ownership of the destination was not "staff."   I have a cron job that sets the groups to all directories to something so my website authors can access the various files.  Once I changed it back to staff, it worked.  All three tests were successful.  

Thanks immensely for the documentation.


Patrick Larkin
Developer/Administrator of Special Systems / Webmaster
Bethlehem Area School District




On Mar 3, 2010, at 9:58 AM, Patrick Larkin wrote:

> The first test returned:  I Lasso, therefore I am.
>
> The second test I wasn't sure what I was supposed to edit and with what.  I changed the username and password.  Is 'destpath' the path I defined in Step 2?  Should it be in quotes?  Not sure what to do with filename.  In this test, I get:
>
> file_create error: Operation not permitted
>
>
> Patrick Larkin
> Developer/Administrator of Special Systems / Webmaster
> Bethlehem Area School District
>
>
>
>
> On Mar 3, 2010, at 9:48 AM, Steve Piercy - Web Site Builder wrote:
>
>> What did my original code samples indicate in testing?
>>
>> --steve
>>
>>
>> On 3/3/10 at 9:45 AM, [hidden email] (Patrick Larkin) pronounced:
>>
>>> Thanks for all the responses!  I followed the document written by Steve Piercy to the T.
>>> I wrote the upload HTML page and the response page just has:
>>>
>>> [inline(-user='username',-password='password')]
>>> [file_processUploads:-Destination='/docs/upload/',-FileOverWrite]
>>> [/inline]
>>>
>>>
>>> Where username=the user in the group given permissions to the upload directory defined (/docs/upload/).
>>>
>>> I changed the group of the this directory to "staff" and it already had rwx for the group.
>>> Alas, I still get the same error I have gotten all along:
>>>
>>>
>>> No permission to access uploaded files.
>>> at: ProcessUploads with params: -Destination='/docs/upload/', -FileOverWrite
>>> at: /docs/upload/response.lasso with params: '-upload.realname'='100208_Supt.pdf', '-upload.name'='/var/tmp/lasso-tmpqNin5I83204970.uld', '-upload.type'='application/pdf', '-upload.size'='52139', '-upload.fieldname'='upload', '-upload2.fieldname'='upload' on line: 15 at position: 2
>>> at: inline with params: -user='username', -password=*****
>>> at: /docs/upload/response.lasso with params: '-upload.realname'='100208_Supt.pdf', '-upload.name'='/var/tmp/lasso-tmpqNin5I83204970.uld', '-upload.type'='application/pdf', '-upload.size'='52139', '-upload.fieldname'='upload', '-upload2.fieldname'='upload'
>>>
>>>
>>>
>>> Help?
>>>
>>> Patrick Larkin
>>> Developer/Administrator of Special Systems / Webmaster
>>> Bethlehem Area School District
>>>
>>>
>>>
>>>
>>> On Mar 2, 2010, at 3:22 PM, Patrick Larkin wrote:
>>>
>>>> Thanks.  I think I'm going to have to spend some time resolving these permissions
>>> issues.  Ugh.
>>>>
>>>> Patrick Larkin
>>>> Developer/Administrator of Special Systems / Webmaster
>>>> Bethlehem Area School District
>>>>
>>>>
>>>>
>>>>
>>>> On Mar 2, 2010, at 3:10 PM, Viaduct Productions wrote:
>>>>
>>>>> On 2010-03-02, at 3:04 PM, Patrick Larkin wrote:
>>>>>
>>>>>> I presume I can have a lasso page that will perform the upload and insert the
>>> two pieces of data into a table.  I just don't know how to do the upload part.  It appears it goes into /var/tmp?  After it is uploaded, I need to have Lasso move it immediately so that the link I generate based on the two data elements entered will work.
>>>>> Quick rundown (all in the file uploads section):
>>>>> file goes into /var/tmp/, and stays there until your receiving lasso page ends,
>>> then it vanishes.  During that time, you use file_uploads tag (container tag) to save it somewhere.  Read that section.
>>>>> The link is essentially generated to that file.  You might have to rename it
>>> something unique, so think about that one.  Otherwise you'll have errors or might be overwriting previous files.
>>>>>   _____________
>>>>> Rich in Toronto
>>>>>  --
>>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>>
>>>>
>>>>
>>>> --
>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>
>>>
>>
>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>> Steve Piercy               Web Site Builder               Soquel, CA
>> <[hidden email]>                  <http://www.StevePiercy.com/>
>>
>>
>> --
>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>
>>
>>
>
>
> --
> This list is a free service of LassoSoft: http://www.LassoSoft.com/
> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
> Manage your subscription: http://www.ListSearch.com/Lasso/
>
>
>


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: Uploading a file

stevepiercy
In reply to this post by Patrick Larkin-2
In test two, you can config these 3 lines:

         -username = 'XXXXXX', // configure this item
         -password = 'XXXXXX' // configure this item
         ),
     'destpath'      = response_path, // config this item

'destpath' should be set to wherever you want to write the file.

     'destpath'      = '/webroot/to/destpath/', // config this item

With that error message, that indicates to me that one of the
steps was missed in configuring file permissions in my guide.  
The two most commonly missed steps are Step 8 (assigning the
lasso user to the web group) and restarting the entire Lasso
server so that it can properly read the OS user and group
changes you made in Step 8.

--steve


On 3/3/10 at 9:58 AM, [hidden email] (Patrick Larkin) pronounced:

>The first test returned:  I Lasso, therefore I am.
>
>The second test I wasn't sure what I was supposed to edit and
>with what.  I changed the username and password.  Is 'destpath'
>the path I defined in Step 2?  Should it be in quotes?  Not
>sure what to do with filename.  In this test, I get:
>
>file_create error: Operation not permitted
>
>
>Patrick Larkin
>Developer/Administrator of Special Systems / Webmaster
>Bethlehem Area School District
>
>
>
>
>On Mar 3, 2010, at 9:48 AM, Steve Piercy - Web Site Builder wrote:
>
>>What did my original code samples indicate in testing?
>>
>>--steve
>>
>>
>>On 3/3/10 at 9:45 AM, [hidden email] (Patrick Larkin) pronounced:
>>
>>> Thanks for all the responses!  I followed the document written by Steve Piercy to
>the T.
>>> I wrote the upload HTML page and the response page just has:
>>>   [inline(-user='username',-password='password')]
>>> [file_processUploads:-Destination='/docs/upload/',-FileOverWrite]
>>> [/inline]
>>>    Where username=the user in the group given permissions to
>>>the upload directory
>defined (/docs/upload/).
>>>   I changed the group of the this directory to "staff" and
>>>it already had rwx for
>the group.
>>> Alas, I still get the same error I have gotten all along:
>>>    No permission to access uploaded files.
>>> at: ProcessUploads with params: -Destination='/docs/upload/', -FileOverWrite
>>> at: /docs/upload/response.lasso with params:
>'-upload.realname'='100208_Supt.pdf',
>'-upload.name'='/var/tmp/lasso-tmpqNin5I83204970.uld',
>'-upload.type'='application/pdf', '-upload.size'='52139',
>'-upload.fieldname'='upload', '-upload2.fieldname'='upload' on
>line: 15 at position: 2
>>> at: inline with params: -user='username', -password=*****
>>> at: /docs/upload/response.lasso with params:
>'-upload.realname'='100208_Supt.pdf',
>'-upload.name'='/var/tmp/lasso-tmpqNin5I83204970.uld',
>'-upload.type'='application/pdf', '-upload.size'='52139',
>'-upload.fieldname'='upload', '-upload2.fieldname'='upload'
>>>     Help?
>>>   Patrick Larkin
>>> Developer/Administrator of Special Systems / Webmaster
>>> Bethlehem Area School District
>>>      On Mar 2, 2010, at 3:22 PM, Patrick Larkin wrote:
>>>
>>>> Thanks.  I think I'm going to have to spend some time resolving these
>permissions
>>> issues.  Ugh.
>>>>   Patrick Larkin
>>>> Developer/Administrator of Special Systems / Webmaster
>>>> Bethlehem Area School District
>>>>      On Mar 2, 2010, at 3:10 PM, Viaduct Productions wrote:
>>>>
>>>>>  On 2010-03-02, at 3:04 PM, Patrick Larkin wrote:
>>>>>
>>>>>> I presume I can have a lasso page that will perform the upload and insert the
>>> two pieces of data into a table.  I just don't know how to do the upload part.
>It appears it goes into /var/tmp?  After it is uploaded, I need
>to have Lasso move it immediately so that the link I generate
>based on the two data elements entered will work.
>>>>>  Quick rundown (all in the file uploads section):
>>>>>  file goes into /var/tmp/, and stays there until your receiving lasso page
>ends,
>>> then it vanishes.  During that time, you use file_uploads tag (container tag) to
>save it somewhere.  Read that section.
>>>>>  The link is essentially generated to that file.  You might have to rename it
>>> something unique, so think about that one.  Otherwise you'll have errors or might
>be overwriting previous files.
>>>>>    _____________
>>>>> Rich in Toronto
>>>>>   --
>>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>>
>>>>    --
>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>  
>>>    --
>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>  
>>
>>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>Steve Piercy               Web Site Builder               Soquel, CA
>><[hidden email]>                  <http://www.StevePiercy.com/>
>>
>>
>>--
>>This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>Manage your subscription: http://www.ListSearch.com/Lasso/
>>
>>
>>
>
>
>--
>This list is a free service of LassoSoft: http://www.LassoSoft.com/
>Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>Manage your subscription: http://www.ListSearch.com/Lasso/
>
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: Uploading a file

stevepiercy
In reply to this post by Patrick Larkin-2
Sweet!  So your modified upload script works, as well as the 3
original test scripts?

--steve


On 3/3/10 at 10:10 AM, [hidden email] (Patrick Larkin) pronounced:

>An addendum.
>
>The second script works fine.  The group ownership of the
>destination was not "staff."   I have a cron job that sets the
>groups to all directories to something so my website authors
>can access the various files.  Once I changed it back to staff,
>it worked.  All three tests were successful.
>Thanks immensely for the documentation.
>
>
>Patrick Larkin
>Developer/Administrator of Special Systems / Webmaster
>Bethlehem Area School District
>
>
>
>
>On Mar 3, 2010, at 9:58 AM, Patrick Larkin wrote:
>
>>The first test returned:  I Lasso, therefore I am.
>>
>>The second test I wasn't sure what I was supposed to edit and with what.  I
>changed the username and password.  Is 'destpath' the path I
>defined in Step 2?  Should it be in quotes?  Not sure what to
>do with filename.  In this test, I get:
>>
>>file_create error: Operation not permitted
>>
>>
>>Patrick Larkin
>>Developer/Administrator of Special Systems / Webmaster
>>Bethlehem Area School District
>>
>>
>>
>>
>>On Mar 3, 2010, at 9:48 AM, Steve Piercy - Web Site Builder wrote:
>>
>>> What did my original code samples indicate in testing?
>>>   --steve
>>>    On 3/3/10 at 9:45 AM, [hidden email] (Patrick
>>>Larkin) pronounced:
>>>
>>>> Thanks for all the responses!  I followed the document written by Steve Piercy
>to the T.
>>>> I wrote the upload HTML page and the response page just has:
>>>>   [inline(-user='username',-password='password')]
>>>> [file_processUploads:-Destination='/docs/upload/',-FileOverWrite]
>>>> [/inline]
>>>>    Where username=the user in the group given permissions
>>>>to the upload directory
>defined (/docs/upload/).
>>>>   I changed the group of the this directory to "staff" and
>>>>it already had rwx for
>the group.
>>>> Alas, I still get the same error I have gotten all along:
>>>>    No permission to access uploaded files.
>>>> at: ProcessUploads with params: -Destination='/docs/upload/', -FileOverWrite
>>>> at: /docs/upload/response.lasso with params:
>'-upload.realname'='100208_Supt.pdf',
>'-upload.name'='/var/tmp/lasso-tmpqNin5I83204970.uld',
>'-upload.type'='application/pdf', '-upload.size'='52139',
>'-upload.fieldname'='upload', '-upload2.fieldname'='upload' on
>line: 15 at position: 2
>>>> at: inline with params: -user='username', -password=*****
>>>> at: /docs/upload/response.lasso with params:
>'-upload.realname'='100208_Supt.pdf',
>'-upload.name'='/var/tmp/lasso-tmpqNin5I83204970.uld',
>'-upload.type'='application/pdf', '-upload.size'='52139',
>'-upload.fieldname'='upload', '-upload2.fieldname'='upload'
>>>>     Help?
>>>>   Patrick Larkin
>>>> Developer/Administrator of Special Systems / Webmaster
>>>> Bethlehem Area School District
>>>>      On Mar 2, 2010, at 3:22 PM, Patrick Larkin wrote:
>>>>
>>>>> Thanks.  I think I'm going to have to spend some time resolving these
>permissions
>>>> issues.  Ugh.
>>>>>   Patrick Larkin
>>>>> Developer/Administrator of Special Systems / Webmaster
>>>>> Bethlehem Area School District
>>>>>      On Mar 2, 2010, at 3:10 PM, Viaduct Productions wrote:
>>>>>
>>>>>> On 2010-03-02, at 3:04 PM, Patrick Larkin wrote:
>>>>>>
>>>>>>> I presume I can have a lasso page that will perform the upload and insert the
>>>> two pieces of data into a table.  I just don't know how to do the upload part.
>It appears it goes into /var/tmp?  After it is uploaded, I need
>to have Lasso move it immediately so that the link I generate
>based on the two data elements entered will work.
>>>>>> Quick rundown (all in the file uploads section):
>>>>>> file goes into /var/tmp/, and stays there until your receiving lasso page
>ends,
>>>> then it vanishes.  During that time, you use file_uploads tag (container tag) to
>save it somewhere.  Read that section.
>>>>>> The link is essentially generated to that file.  You might have to rename it
>>>> something unique, so think about that one.  Otherwise you'll have errors or
>might be overwriting previous files.
>>>>>>   _____________
>>>>>> Rich in Toronto
>>>>>>  --
>>>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>>>
>>>>>    --
>>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>>  
>>>>    --
>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>  
>>>   -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>>-- -- -- --
>>> Steve Piercy               Web Site Builder               Soquel, CA
>>> <[hidden email]>                  <http://www.StevePiercy.com/>
>>>    --
>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>  
>>
>>
>>--
>>This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>Manage your subscription: http://www.ListSearch.com/Lasso/
>>
>>
>>
>
>
>--
>This list is a free service of LassoSoft: http://www.LassoSoft.com/
>Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>Manage your subscription: http://www.ListSearch.com/Lasso/
>
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: Uploading a file

Patrick Larkin-2
Well, not quite.

Your third test file works great.

My uploader with the simple script:


        [inline(-user='un',-password='pw')]
               
                [file_processUploads:-Destination='/docs/upload/',-FileOverWrite]

        [/inline]

does not work.  Still gives a "No permission to access uploaded files." error.

Patrick Larkin
Developer/Administrator of Special Systems / Webmaster
Bethlehem Area School District




On Mar 3, 2010, at 10:15 AM, Steve Piercy - Web Site Builder wrote:

> Sweet!  So your modified upload script works, as well as the 3 original test scripts?
>
> --steve
>
>
> On 3/3/10 at 10:10 AM, [hidden email] (Patrick Larkin) pronounced:
>
>> An addendum.
>>
>> The second script works fine.  The group ownership of the destination was not "staff."   I have a cron job that sets the groups to all directories to something so my website authors can access the various files.  Once I changed it back to staff, it worked.  All three tests were successful.
>> Thanks immensely for the documentation.
>>
>>
>> Patrick Larkin
>> Developer/Administrator of Special Systems / Webmaster
>> Bethlehem Area School District
>>
>>
>>
>>
>> On Mar 3, 2010, at 9:58 AM, Patrick Larkin wrote:
>>
>>> The first test returned:  I Lasso, therefore I am.
>>>
>>> The second test I wasn't sure what I was supposed to edit and with what.  I
>> changed the username and password.  Is 'destpath' the path I defined in Step 2?  Should it be in quotes?  Not sure what to do with filename.  In this test, I get:
>>>
>>> file_create error: Operation not permitted
>>>
>>>
>>> Patrick Larkin
>>> Developer/Administrator of Special Systems / Webmaster
>>> Bethlehem Area School District
>>>
>>>
>>>
>>>
>>> On Mar 3, 2010, at 9:48 AM, Steve Piercy - Web Site Builder wrote:
>>>
>>>> What did my original code samples indicate in testing?
>>>>  --steve
>>>>   On 3/3/10 at 9:45 AM, [hidden email] (Patrick Larkin) pronounced:
>>>>
>>>>> Thanks for all the responses!  I followed the document written by Steve Piercy
>> to the T.
>>>>> I wrote the upload HTML page and the response page just has:
>>>>>  [inline(-user='username',-password='password')]
>>>>> [file_processUploads:-Destination='/docs/upload/',-FileOverWrite]
>>>>> [/inline]
>>>>>   Where username=the user in the group given permissions to the upload directory
>> defined (/docs/upload/).
>>>>>  I changed the group of the this directory to "staff" and it already had rwx for
>> the group.
>>>>> Alas, I still get the same error I have gotten all along:
>>>>>   No permission to access uploaded files.
>>>>> at: ProcessUploads with params: -Destination='/docs/upload/', -FileOverWrite
>>>>> at: /docs/upload/response.lasso with params:
>> '-upload.realname'='100208_Supt.pdf', '-upload.name'='/var/tmp/lasso-tmpqNin5I83204970.uld', '-upload.type'='application/pdf', '-upload.size'='52139', '-upload.fieldname'='upload', '-upload2.fieldname'='upload' on line: 15 at position: 2
>>>>> at: inline with params: -user='username', -password=*****
>>>>> at: /docs/upload/response.lasso with params:
>> '-upload.realname'='100208_Supt.pdf', '-upload.name'='/var/tmp/lasso-tmpqNin5I83204970.uld', '-upload.type'='application/pdf', '-upload.size'='52139', '-upload.fieldname'='upload', '-upload2.fieldname'='upload'
>>>>>    Help?
>>>>>  Patrick Larkin
>>>>> Developer/Administrator of Special Systems / Webmaster
>>>>> Bethlehem Area School District
>>>>>     On Mar 2, 2010, at 3:22 PM, Patrick Larkin wrote:
>>>>>
>>>>>> Thanks.  I think I'm going to have to spend some time resolving these
>> permissions
>>>>> issues.  Ugh.
>>>>>>  Patrick Larkin
>>>>>> Developer/Administrator of Special Systems / Webmaster
>>>>>> Bethlehem Area School District
>>>>>>     On Mar 2, 2010, at 3:10 PM, Viaduct Productions wrote:
>>>>>>
>>>>>>> On 2010-03-02, at 3:04 PM, Patrick Larkin wrote:
>>>>>>>
>>>>>>>> I presume I can have a lasso page that will perform the upload and insert the
>>>>> two pieces of data into a table.  I just don't know how to do the upload part.
>> It appears it goes into /var/tmp?  After it is uploaded, I need to have Lasso move it immediately so that the link I generate based on the two data elements entered will work.
>>>>>>> Quick rundown (all in the file uploads section):
>>>>>>> file goes into /var/tmp/, and stays there until your receiving lasso page
>> ends,
>>>>> then it vanishes.  During that time, you use file_uploads tag (container tag) to
>> save it somewhere.  Read that section.
>>>>>>> The link is essentially generated to that file.  You might have to rename it
>>>>> something unique, so think about that one.  Otherwise you'll have errors or
>> might be overwriting previous files.
>>>>>>>  _____________
>>>>>>> Rich in Toronto
>>>>>>> --
>>>>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>>>>
>>>>>>   --
>>>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>>>  
>>>>>   --
>>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>>
>>>>  -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>>> Steve Piercy               Web Site Builder               Soquel, CA
>>>> <[hidden email]>                  <http://www.StevePiercy.com/>
>>>>   --
>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>  
>>>
>>>
>>> --
>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>
>>>
>>>
>>
>>
>> --
>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>
>>
>
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> Steve Piercy               Web Site Builder               Soquel, CA
> <[hidden email]>                  <http://www.StevePiercy.com/>
>
>
> --
> This list is a free service of LassoSoft: http://www.LassoSoft.com/
> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
> Manage your subscription: http://www.ListSearch.com/Lasso/
>
>
>


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: Uploading a file

decorior
Did you see the post from Duncan Cameron a while back. He had a very  
nice out-of-the-box solution

Deco
On Mar 3, 2010, at 8:33 AM, Patrick Larkin wrote:

> Well, not quite.
>
> Your third test file works great.
>
> My uploader with the simple script:
>
>
> [inline(-user='un',-password='pw')]
>
> [file_processUploads:-Destination='/docs/upload/',-FileOverWrite]
>
> [/inline]
>
> does not work.  Still gives a "No permission to access uploaded  
> files." error.
>
> Patrick Larkin
> Developer/Administrator of Special Systems / Webmaster
> Bethlehem Area School District
>
>
>
>
> On Mar 3, 2010, at 10:15 AM, Steve Piercy - Web Site Builder wrote:
>
>> Sweet!  So your modified upload script works, as well as the 3  
>> original test scripts?
>>
>> --steve
>>
>>
>> On 3/3/10 at 10:10 AM, [hidden email] (Patrick Larkin)  
>> pronounced:
>>
>>> An addendum.
>>>
>>> The second script works fine.  The group ownership of the  
>>> destination was not "staff."   I have a cron job that sets the  
>>> groups to all directories to something so my website authors can  
>>> access the various files.  Once I changed it back to staff, it  
>>> worked.  All three tests were successful.
>>> Thanks immensely for the documentation.
>>>
>>>
>>> Patrick Larkin
>>> Developer/Administrator of Special Systems / Webmaster
>>> Bethlehem Area School District
>>>
>>>
>>>
>>>
>>> On Mar 3, 2010, at 9:58 AM, Patrick Larkin wrote:
>>>
>>>> The first test returned:  I Lasso, therefore I am.
>>>>
>>>> The second test I wasn't sure what I was supposed to edit and  
>>>> with what.  I
>>> changed the username and password.  Is 'destpath' the path I  
>>> defined in Step 2?  Should it be in quotes?  Not sure what to do  
>>> with filename.  In this test, I get:
>>>>
>>>> file_create error: Operation not permitted
>>>>
>>>>
>>>> Patrick Larkin
>>>> Developer/Administrator of Special Systems / Webmaster
>>>> Bethlehem Area School District
>>>>
>>>>
>>>>
>>>>
>>>> On Mar 3, 2010, at 9:48 AM, Steve Piercy - Web Site Builder wrote:
>>>>
>>>>> What did my original code samples indicate in testing?
>>>>> --steve
>>>>>  On 3/3/10 at 9:45 AM, [hidden email] (Patrick Larkin)  
>>>>> pronounced:
>>>>>
>>>>>> Thanks for all the responses!  I followed the document written  
>>>>>> by Steve Piercy
>>> to the T.
>>>>>> I wrote the upload HTML page and the response page just has:
>>>>>> [inline(-user='username',-password='password')]
>>>>>> [file_processUploads:-Destination='/docs/upload/',-FileOverWrite]
>>>>>> [/inline]
>>>>>>  Where username=the user in the group given permissions to the  
>>>>>> upload directory
>>> defined (/docs/upload/).
>>>>>> I changed the group of the this directory to "staff" and it  
>>>>>> already had rwx for
>>> the group.
>>>>>> Alas, I still get the same error I have gotten all along:
>>>>>>  No permission to access uploaded files.
>>>>>> at: ProcessUploads with params: -Destination='/docs/upload/', -
>>>>>> FileOverWrite
>>>>>> at: /docs/upload/response.lasso with params:
>>> '-upload.realname'='100208_Supt.pdf', '-upload.name'='/var/tmp/
>>> lasso-tmpqNin5I83204970.uld', '-upload.type'='application/pdf', '-
>>> upload.size'='52139', '-upload.fieldname'='upload', '-
>>> upload2.fieldname'='upload' on line: 15 at position: 2
>>>>>> at: inline with params: -user='username', -password=*****
>>>>>> at: /docs/upload/response.lasso with params:
>>> '-upload.realname'='100208_Supt.pdf', '-upload.name'='/var/tmp/
>>> lasso-tmpqNin5I83204970.uld', '-upload.type'='application/pdf', '-
>>> upload.size'='52139', '-upload.fieldname'='upload', '-
>>> upload2.fieldname'='upload'
>>>>>>   Help?
>>>>>> Patrick Larkin
>>>>>> Developer/Administrator of Special Systems / Webmaster
>>>>>> Bethlehem Area School District
>>>>>>    On Mar 2, 2010, at 3:22 PM, Patrick Larkin wrote:
>>>>>>
>>>>>>> Thanks.  I think I'm going to have to spend some time  
>>>>>>> resolving these
>>> permissions
>>>>>> issues.  Ugh.
>>>>>>> Patrick Larkin
>>>>>>> Developer/Administrator of Special Systems / Webmaster
>>>>>>> Bethlehem Area School District
>>>>>>>    On Mar 2, 2010, at 3:10 PM, Viaduct Productions wrote:
>>>>>>>
>>>>>>>> On 2010-03-02, at 3:04 PM, Patrick Larkin wrote:
>>>>>>>>
>>>>>>>>> I presume I can have a lasso page that will perform the  
>>>>>>>>> upload and insert the
>>>>>> two pieces of data into a table.  I just don't know how to do  
>>>>>> the upload part.
>>> It appears it goes into /var/tmp?  After it is uploaded, I need to  
>>> have Lasso move it immediately so that the link I generate based  
>>> on the two data elements entered will work.
>>>>>>>> Quick rundown (all in the file uploads section):
>>>>>>>> file goes into /var/tmp/, and stays there until your  
>>>>>>>> receiving lasso page
>>> ends,
>>>>>> then it vanishes.  During that time, you use file_uploads tag  
>>>>>> (container tag) to
>>> save it somewhere.  Read that section.
>>>>>>>> The link is essentially generated to that file.  You might  
>>>>>>>> have to rename it
>>>>>> something unique, so think about that one.  Otherwise you'll  
>>>>>> have errors or
>>> might be overwriting previous files.
>>>>>>>> _____________
>>>>>>>> Rich in Toronto
>>>>>>>> --
>>>>>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>>>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>>>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>>>>>
>>>>>>>  --
>>>>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>>>>> Search the list archives: http://www.ListSearch.com/Lasso/ 
>>>>>>> Browse/
>>>>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>>>>
>>>>>>  --
>>>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>>>
>>>>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  
>>>>> -- --
>>>>> Steve Piercy               Web Site Builder                
>>>>> Soquel, CA
>>>>> <[hidden email]>                  <http://www.StevePiercy.com/ 
>>>>> >
>>>>>  --
>>>>> This list is a free service of LassoSoft: http://
>>>>> www.LassoSoft.com/
>>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>>
>>>>
>>>>
>>>> --
>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>
>>>
>>
>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>> Steve Piercy               Web Site Builder               Soquel, CA
>> <[hidden email]>                  <http://www.StevePiercy.com/>
>>
>>
>> --
>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>
>>
>>
>
>
> --
> This list is a free service of LassoSoft: http://www.LassoSoft.com/
> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
> Manage your subscription: http://www.ListSearch.com/Lasso/
>
>


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: Uploading a file

Patrick Larkin-2
No I didn't.  Sorry.

Looking at Steve Piercy's code in his test files, he uses "file_copy" rather than "file_processUploads"

I might be missing something.  No, it's very likely that I am.  :)

Patrick Larkin
Developer/Administrator of Special Systems / Webmaster
Bethlehem Area School District




On Mar 3, 2010, at 10:39 AM, Deco Rior (Tennissource) wrote:

> Did you see the post from Duncan Cameron a while back. He had a very nice out-of-the-box solution
>
> Deco
> On Mar 3, 2010, at 8:33 AM, Patrick Larkin wrote:
>
>> Well, not quite.
>>
>> Your third test file works great.
>>
>> My uploader with the simple script:
>>
>>
>> [inline(-user='un',-password='pw')]
>>
>> [file_processUploads:-Destination='/docs/upload/',-FileOverWrite]
>>
>> [/inline]
>>
>> does not work.  Still gives a "No permission to access uploaded files." error.
>>
>> Patrick Larkin
>> Developer/Administrator of Special Systems / Webmaster
>> Bethlehem Area School District
>>
>>
>>
>>
>> On Mar 3, 2010, at 10:15 AM, Steve Piercy - Web Site Builder wrote:
>>
>>> Sweet!  So your modified upload script works, as well as the 3 original test scripts?
>>>
>>> --steve
>>>
>>>
>>> On 3/3/10 at 10:10 AM, [hidden email] (Patrick Larkin) pronounced:
>>>
>>>> An addendum.
>>>>
>>>> The second script works fine.  The group ownership of the destination was not "staff."   I have a cron job that sets the groups to all directories to something so my website authors can access the various files.  Once I changed it back to staff, it worked.  All three tests were successful.
>>>> Thanks immensely for the documentation.
>>>>
>>>>
>>>> Patrick Larkin
>>>> Developer/Administrator of Special Systems / Webmaster
>>>> Bethlehem Area School District
>>>>
>>>>
>>>>
>>>>
>>>> On Mar 3, 2010, at 9:58 AM, Patrick Larkin wrote:
>>>>
>>>>> The first test returned:  I Lasso, therefore I am.
>>>>>
>>>>> The second test I wasn't sure what I was supposed to edit and with what.  I
>>>> changed the username and password.  Is 'destpath' the path I defined in Step 2?  Should it be in quotes?  Not sure what to do with filename.  In this test, I get:
>>>>>
>>>>> file_create error: Operation not permitted
>>>>>
>>>>>
>>>>> Patrick Larkin
>>>>> Developer/Administrator of Special Systems / Webmaster
>>>>> Bethlehem Area School District
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Mar 3, 2010, at 9:48 AM, Steve Piercy - Web Site Builder wrote:
>>>>>
>>>>>> What did my original code samples indicate in testing?
>>>>>> --steve
>>>>>> On 3/3/10 at 9:45 AM, [hidden email] (Patrick Larkin) pronounced:
>>>>>>
>>>>>>> Thanks for all the responses!  I followed the document written by Steve Piercy
>>>> to the T.
>>>>>>> I wrote the upload HTML page and the response page just has:
>>>>>>> [inline(-user='username',-password='password')]
>>>>>>> [file_processUploads:-Destination='/docs/upload/',-FileOverWrite]
>>>>>>> [/inline]
>>>>>>> Where username=the user in the group given permissions to the upload directory
>>>> defined (/docs/upload/).
>>>>>>> I changed the group of the this directory to "staff" and it already had rwx for
>>>> the group.
>>>>>>> Alas, I still get the same error I have gotten all along:
>>>>>>> No permission to access uploaded files.
>>>>>>> at: ProcessUploads with params: -Destination='/docs/upload/', -FileOverWrite
>>>>>>> at: /docs/upload/response.lasso with params:
>>>> '-upload.realname'='100208_Supt.pdf', '-upload.name'='/var/tmp/lasso-tmpqNin5I83204970.uld', '-upload.type'='application/pdf', '-upload.size'='52139', '-upload.fieldname'='upload', '-upload2.fieldname'='upload' on line: 15 at position: 2
>>>>>>> at: inline with params: -user='username', -password=*****
>>>>>>> at: /docs/upload/response.lasso with params:
>>>> '-upload.realname'='100208_Supt.pdf', '-upload.name'='/var/tmp/lasso-tmpqNin5I83204970.uld', '-upload.type'='application/pdf', '-upload.size'='52139', '-upload.fieldname'='upload', '-upload2.fieldname'='upload'
>>>>>>>  Help?
>>>>>>> Patrick Larkin
>>>>>>> Developer/Administrator of Special Systems / Webmaster
>>>>>>> Bethlehem Area School District
>>>>>>>   On Mar 2, 2010, at 3:22 PM, Patrick Larkin wrote:
>>>>>>>
>>>>>>>> Thanks.  I think I'm going to have to spend some time resolving these
>>>> permissions
>>>>>>> issues.  Ugh.
>>>>>>>> Patrick Larkin
>>>>>>>> Developer/Administrator of Special Systems / Webmaster
>>>>>>>> Bethlehem Area School District
>>>>>>>>   On Mar 2, 2010, at 3:10 PM, Viaduct Productions wrote:
>>>>>>>>
>>>>>>>>> On 2010-03-02, at 3:04 PM, Patrick Larkin wrote:
>>>>>>>>>
>>>>>>>>>> I presume I can have a lasso page that will perform the upload and insert the
>>>>>>> two pieces of data into a table.  I just don't know how to do the upload part.
>>>> It appears it goes into /var/tmp?  After it is uploaded, I need to have Lasso move it immediately so that the link I generate based on the two data elements entered will work.
>>>>>>>>> Quick rundown (all in the file uploads section):
>>>>>>>>> file goes into /var/tmp/, and stays there until your receiving lasso page
>>>> ends,
>>>>>>> then it vanishes.  During that time, you use file_uploads tag (container tag) to
>>>> save it somewhere.  Read that section.
>>>>>>>>> The link is essentially generated to that file.  You might have to rename it
>>>>>>> something unique, so think about that one.  Otherwise you'll have errors or
>>>> might be overwriting previous files.
>>>>>>>>> _____________
>>>>>>>>> Rich in Toronto
>>>>>>>>> --
>>>>>>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>>>>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>>>>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>>>>>>
>>>>>>>> --
>>>>>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>>>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>>>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>>>>>
>>>>>>> --
>>>>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>>>>
>>>>>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>>>>> Steve Piercy               Web Site Builder               Soquel, CA
>>>>>> <[hidden email]>                  <http://www.StevePiercy.com/>
>>>>>> --
>>>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>
>>>>
>>>
>>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>> Steve Piercy               Web Site Builder               Soquel, CA
>>> <[hidden email]>                  <http://www.StevePiercy.com/>
>>>
>>>
>>> --
>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>
>>>
>>>
>>
>>
>> --
>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>
>>
>
>
> --
> This list is a free service of LassoSoft: http://www.LassoSoft.com/
> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
> Manage your subscription: http://www.ListSearch.com/Lasso/
>
>
>


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: Uploading a file

Patrick Larkin-2
OK, I'm having trouble deciphering some code in the test file code I'm working from.


I want my upload to disregard the actual name of the file and instead name it using the 5 data inputs I prompt the user for:

Month, Day, Year, Document Type, and Meeting Type.  They are all entered using select lists.  



$this_file = $i->find('upload.realname')->split('/')->last->split('\\')->last;
                       
file_copy(
        $i->find('upload.name'),
        ($dest + $this_file));


---------------

I cannot decipher what that code is doing.  I tried to replace it with something simple that I can understand:

$this_file=action_param:'y' + action_param:'m' + action_param:'d' + '_' + action_param:'mtype' + '_' + action_param:'dtype' + '_' + '.pdf';

But this just results in the file being copied with the temp Lasso name.  My app will only ever upload a single file and the files will always be PDF.




Patrick Larkin
Developer/Administrator of Special Systems / Webmaster
Bethlehem Area School District




On Mar 3, 2010, at 10:48 AM, Patrick Larkin wrote:

> No I didn't.  Sorry.
>
> Looking at Steve Piercy's code in his test files, he uses "file_copy" rather than "file_processUploads"
>
> I might be missing something.  No, it's very likely that I am.  :)
>
> Patrick Larkin
> Developer/Administrator of Special Systems / Webmaster
> Bethlehem Area School District
>
>
>
>
> On Mar 3, 2010, at 10:39 AM, Deco Rior (Tennissource) wrote:
>
>> Did you see the post from Duncan Cameron a while back. He had a very nice out-of-the-box solution
>>
>> Deco
>> On Mar 3, 2010, at 8:33 AM, Patrick Larkin wrote:
>>
>>> Well, not quite.
>>>
>>> Your third test file works great.
>>>
>>> My uploader with the simple script:
>>>
>>>
>>> [inline(-user='un',-password='pw')]
>>>
>>> [file_processUploads:-Destination='/docs/upload/',-FileOverWrite]
>>>
>>> [/inline]
>>>
>>> does not work.  Still gives a "No permission to access uploaded files." error.
>>>
>>> Patrick Larkin
>>> Developer/Administrator of Special Systems / Webmaster
>>> Bethlehem Area School District
>>>
>>>
>>>
>>>
>>> On Mar 3, 2010, at 10:15 AM, Steve Piercy - Web Site Builder wrote:
>>>
>>>> Sweet!  So your modified upload script works, as well as the 3 original test scripts?
>>>>
>>>> --steve
>>>>
>>>>
>>>> On 3/3/10 at 10:10 AM, [hidden email] (Patrick Larkin) pronounced:
>>>>
>>>>> An addendum.
>>>>>
>>>>> The second script works fine.  The group ownership of the destination was not "staff."   I have a cron job that sets the groups to all directories to something so my website authors can access the various files.  Once I changed it back to staff, it worked.  All three tests were successful.
>>>>> Thanks immensely for the documentation.
>>>>>
>>>>>
>>>>> Patrick Larkin
>>>>> Developer/Administrator of Special Systems / Webmaster
>>>>> Bethlehem Area School District
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Mar 3, 2010, at 9:58 AM, Patrick Larkin wrote:
>>>>>
>>>>>> The first test returned:  I Lasso, therefore I am.
>>>>>>
>>>>>> The second test I wasn't sure what I was supposed to edit and with what.  I
>>>>> changed the username and password.  Is 'destpath' the path I defined in Step 2?  Should it be in quotes?  Not sure what to do with filename.  In this test, I get:
>>>>>>
>>>>>> file_create error: Operation not permitted
>>>>>>
>>>>>>
>>>>>> Patrick Larkin
>>>>>> Developer/Administrator of Special Systems / Webmaster
>>>>>> Bethlehem Area School District
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Mar 3, 2010, at 9:48 AM, Steve Piercy - Web Site Builder wrote:
>>>>>>
>>>>>>> What did my original code samples indicate in testing?
>>>>>>> --steve
>>>>>>> On 3/3/10 at 9:45 AM, [hidden email] (Patrick Larkin) pronounced:
>>>>>>>
>>>>>>>> Thanks for all the responses!  I followed the document written by Steve Piercy
>>>>> to the T.
>>>>>>>> I wrote the upload HTML page and the response page just has:
>>>>>>>> [inline(-user='username',-password='password')]
>>>>>>>> [file_processUploads:-Destination='/docs/upload/',-FileOverWrite]
>>>>>>>> [/inline]
>>>>>>>> Where username=the user in the group given permissions to the upload directory
>>>>> defined (/docs/upload/).
>>>>>>>> I changed the group of the this directory to "staff" and it already had rwx for
>>>>> the group.
>>>>>>>> Alas, I still get the same error I have gotten all along:
>>>>>>>> No permission to access uploaded files.
>>>>>>>> at: ProcessUploads with params: -Destination='/docs/upload/', -FileOverWrite
>>>>>>>> at: /docs/upload/response.lasso with params:
>>>>> '-upload.realname'='100208_Supt.pdf', '-upload.name'='/var/tmp/lasso-tmpqNin5I83204970.uld', '-upload.type'='application/pdf', '-upload.size'='52139', '-upload.fieldname'='upload', '-upload2.fieldname'='upload' on line: 15 at position: 2
>>>>>>>> at: inline with params: -user='username', -password=*****
>>>>>>>> at: /docs/upload/response.lasso with params:
>>>>> '-upload.realname'='100208_Supt.pdf', '-upload.name'='/var/tmp/lasso-tmpqNin5I83204970.uld', '-upload.type'='application/pdf', '-upload.size'='52139', '-upload.fieldname'='upload', '-upload2.fieldname'='upload'
>>>>>>>> Help?
>>>>>>>> Patrick Larkin
>>>>>>>> Developer/Administrator of Special Systems / Webmaster
>>>>>>>> Bethlehem Area School District
>>>>>>>>  On Mar 2, 2010, at 3:22 PM, Patrick Larkin wrote:
>>>>>>>>
>>>>>>>>> Thanks.  I think I'm going to have to spend some time resolving these
>>>>> permissions
>>>>>>>> issues.  Ugh.
>>>>>>>>> Patrick Larkin
>>>>>>>>> Developer/Administrator of Special Systems / Webmaster
>>>>>>>>> Bethlehem Area School District
>>>>>>>>>  On Mar 2, 2010, at 3:10 PM, Viaduct Productions wrote:
>>>>>>>>>
>>>>>>>>>> On 2010-03-02, at 3:04 PM, Patrick Larkin wrote:
>>>>>>>>>>
>>>>>>>>>>> I presume I can have a lasso page that will perform the upload and insert the
>>>>>>>> two pieces of data into a table.  I just don't know how to do the upload part.
>>>>> It appears it goes into /var/tmp?  After it is uploaded, I need to have Lasso move it immediately so that the link I generate based on the two data elements entered will work.
>>>>>>>>>> Quick rundown (all in the file uploads section):
>>>>>>>>>> file goes into /var/tmp/, and stays there until your receiving lasso page
>>>>> ends,
>>>>>>>> then it vanishes.  During that time, you use file_uploads tag (container tag) to
>>>>> save it somewhere.  Read that section.
>>>>>>>>>> The link is essentially generated to that file.  You might have to rename it
>>>>>>>> something unique, so think about that one.  Otherwise you'll have errors or
>>>>> might be overwriting previous files.
>>>>>>>>>> _____________
>>>>>>>>>> Rich in Toronto
>>>>>>>>>> --
>>>>>>>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>>>>>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>>>>>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>>>>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>>>>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>>>>>>
>>>>>>>> --
>>>>>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>>>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>>>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>>>>>
>>>>>>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>>>>>> Steve Piercy               Web Site Builder               Soquel, CA
>>>>>>> <[hidden email]>                  <http://www.StevePiercy.com/>
>>>>>>> --
>>>>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>>
>>>>>
>>>>
>>>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>>> Steve Piercy               Web Site Builder               Soquel, CA
>>>> <[hidden email]>                  <http://www.StevePiercy.com/>
>>>>
>>>>
>>>> --
>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>
>>>
>>
>>
>> --
>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>
>>
>>
>
>
> --
> This list is a free service of LassoSoft: http://www.LassoSoft.com/
> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
> Manage your subscription: http://www.ListSearch.com/Lasso/
>
>
>


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: Uploading a file

jasonhuck
I haven't really been following this discussion very closely, but one
thing I will point out about this code:

$this_file=action_param:'y' + action_param:'m' + action_param:'d' +
'_' + action_param:'mtype' + '_' + action_param:'dtype' + '_' +
'.pdf';

...is that it is highly ambiguous. This could easily be interpreted to
mean that you want to assign the variable $this_file the value of an
action param whose name is derived in part from another action param
whose name is derived in part from another action param, and on and on
until you hit the semicolon at the end.

If that's what's happening, the result will be an empty string, in
which case the file_copy tag probably reverts to using the original
filename as if nothing else was passed.

At the very least, you need a healthy dose of parentheses to clarify
your intent, and once you've added those, you might as well get rid of
the colons, since they will then be pointless:

$this_file = action_param('y') + action_param('m') + action_param('d')
+ '_' + action_param('mtype') + '_' + action_param('dtype') + '_' +
'.pdf';

- jason





On Wed, Mar 3, 2010 at 11:41 AM, Patrick Larkin <[hidden email]> wrote:

> OK, I'm having trouble deciphering some code in the test file code I'm working from.
>
>
> I want my upload to disregard the actual name of the file and instead name it using the 5 data inputs I prompt the user for:
>
> Month, Day, Year, Document Type, and Meeting Type.  They are all entered using select lists.
>
>
>
> $this_file = $i->find('upload.realname')->split('/')->last->split('\\')->last;
>
> file_copy(
>        $i->find('upload.name'),
>        ($dest + $this_file));
>
>
> ---------------
>
> I cannot decipher what that code is doing.  I tried to replace it with something simple that I can understand:
>
> $this_file=action_param:'y' + action_param:'m' + action_param:'d' + '_' + action_param:'mtype' + '_' + action_param:'dtype' + '_' + '.pdf';
>
> But this just results in the file being copied with the temp Lasso name.  My app will only ever upload a single file and the files will always be PDF.
>
>
>
>
> Patrick Larkin
> Developer/Administrator of Special Systems / Webmaster
> Bethlehem Area School District
>
>
>
>
> On Mar 3, 2010, at 10:48 AM, Patrick Larkin wrote:
>
>> No I didn't.  Sorry.
>>
>> Looking at Steve Piercy's code in his test files, he uses "file_copy" rather than "file_processUploads"
>>
>> I might be missing something.  No, it's very likely that I am.  :)
>>
>> Patrick Larkin
>> Developer/Administrator of Special Systems / Webmaster
>> Bethlehem Area School District
>>
>>
>>
>>
>> On Mar 3, 2010, at 10:39 AM, Deco Rior (Tennissource) wrote:
>>
>>> Did you see the post from Duncan Cameron a while back. He had a very nice out-of-the-box solution
>>>
>>> Deco
>>> On Mar 3, 2010, at 8:33 AM, Patrick Larkin wrote:
>>>
>>>> Well, not quite.
>>>>
>>>> Your third test file works great.
>>>>
>>>> My uploader with the simple script:
>>>>
>>>>
>>>>     [inline(-user='un',-password='pw')]
>>>>
>>>>             [file_processUploads:-Destination='/docs/upload/',-FileOverWrite]
>>>>
>>>>     [/inline]
>>>>
>>>> does not work.  Still gives a "No permission to access uploaded files." error.
>>>>
>>>> Patrick Larkin
>>>> Developer/Administrator of Special Systems / Webmaster
>>>> Bethlehem Area School District
>>>>
>>>>
>>>>
>>>>
>>>> On Mar 3, 2010, at 10:15 AM, Steve Piercy - Web Site Builder wrote:
>>>>
>>>>> Sweet!  So your modified upload script works, as well as the 3 original test scripts?
>>>>>
>>>>> --steve
>>>>>
>>>>>
>>>>> On 3/3/10 at 10:10 AM, [hidden email] (Patrick Larkin) pronounced:
>>>>>
>>>>>> An addendum.
>>>>>>
>>>>>> The second script works fine.  The group ownership of the destination was not "staff."   I have a cron job that sets the groups to all directories to something so my website authors can access the various files.  Once I changed it back to staff, it worked.  All three tests were successful.
>>>>>> Thanks immensely for the documentation.
>>>>>>
>>>>>>
>>>>>> Patrick Larkin
>>>>>> Developer/Administrator of Special Systems / Webmaster
>>>>>> Bethlehem Area School District
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Mar 3, 2010, at 9:58 AM, Patrick Larkin wrote:
>>>>>>
>>>>>>> The first test returned:  I Lasso, therefore I am.
>>>>>>>
>>>>>>> The second test I wasn't sure what I was supposed to edit and with what.  I
>>>>>> changed the username and password.  Is 'destpath' the path I defined in Step 2?  Should it be in quotes?  Not sure what to do with filename.  In this test, I get:
>>>>>>>
>>>>>>> file_create error: Operation not permitted
>>>>>>>
>>>>>>>
>>>>>>> Patrick Larkin
>>>>>>> Developer/Administrator of Special Systems / Webmaster
>>>>>>> Bethlehem Area School District
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Mar 3, 2010, at 9:48 AM, Steve Piercy - Web Site Builder wrote:
>>>>>>>
>>>>>>>> What did my original code samples indicate in testing?
>>>>>>>> --steve
>>>>>>>> On 3/3/10 at 9:45 AM, [hidden email] (Patrick Larkin) pronounced:
>>>>>>>>
>>>>>>>>> Thanks for all the responses!  I followed the document written by Steve Piercy
>>>>>> to the T.
>>>>>>>>> I wrote the upload HTML page and the response page just has:
>>>>>>>>> [inline(-user='username',-password='password')]
>>>>>>>>> [file_processUploads:-Destination='/docs/upload/',-FileOverWrite]
>>>>>>>>> [/inline]
>>>>>>>>> Where username=the user in the group given permissions to the upload directory
>>>>>> defined (/docs/upload/).
>>>>>>>>> I changed the group of the this directory to "staff" and it already had rwx for
>>>>>> the group.
>>>>>>>>> Alas, I still get the same error I have gotten all along:
>>>>>>>>> No permission to access uploaded files.
>>>>>>>>> at: ProcessUploads with params: -Destination='/docs/upload/', -FileOverWrite
>>>>>>>>> at: /docs/upload/response.lasso with params:
>>>>>> '-upload.realname'='100208_Supt.pdf', '-upload.name'='/var/tmp/lasso-tmpqNin5I83204970.uld', '-upload.type'='application/pdf', '-upload.size'='52139', '-upload.fieldname'='upload', '-upload2.fieldname'='upload' on line: 15 at position: 2
>>>>>>>>> at: inline with params: -user='username', -password=*****
>>>>>>>>> at: /docs/upload/response.lasso with params:
>>>>>> '-upload.realname'='100208_Supt.pdf', '-upload.name'='/var/tmp/lasso-tmpqNin5I83204970.uld', '-upload.type'='application/pdf', '-upload.size'='52139', '-upload.fieldname'='upload', '-upload2.fieldname'='upload'
>>>>>>>>> Help?
>>>>>>>>> Patrick Larkin
>>>>>>>>> Developer/Administrator of Special Systems / Webmaster
>>>>>>>>> Bethlehem Area School District
>>>>>>>>>  On Mar 2, 2010, at 3:22 PM, Patrick Larkin wrote:
>>>>>>>>>
>>>>>>>>>> Thanks.  I think I'm going to have to spend some time resolving these
>>>>>> permissions
>>>>>>>>> issues.  Ugh.
>>>>>>>>>> Patrick Larkin
>>>>>>>>>> Developer/Administrator of Special Systems / Webmaster
>>>>>>>>>> Bethlehem Area School District
>>>>>>>>>>  On Mar 2, 2010, at 3:10 PM, Viaduct Productions wrote:
>>>>>>>>>>
>>>>>>>>>>> On 2010-03-02, at 3:04 PM, Patrick Larkin wrote:
>>>>>>>>>>>
>>>>>>>>>>>> I presume I can have a lasso page that will perform the upload and insert the
>>>>>>>>> two pieces of data into a table.  I just don't know how to do the upload part.
>>>>>> It appears it goes into /var/tmp?  After it is uploaded, I need to have Lasso move it immediately so that the link I generate based on the two data elements entered will work.
>>>>>>>>>>> Quick rundown (all in the file uploads section):
>>>>>>>>>>> file goes into /var/tmp/, and stays there until your receiving lasso page
>>>>>> ends,
>>>>>>>>> then it vanishes.  During that time, you use file_uploads tag (container tag) to
>>>>>> save it somewhere.  Read that section.
>>>>>>>>>>> The link is essentially generated to that file.  You might have to rename it
>>>>>>>>> something unique, so think about that one.  Otherwise you'll have errors or
>>>>>> might be overwriting previous files.
>>>>>>>>>>> _____________
>>>>>>>>>>> Rich in Toronto
>>>>>>>>>>> --
>>>>>>>>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>>>>>>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>>>>>>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>>>>>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>>>>>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>>>>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>>>>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>>>>>>
>>>>>>>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>>>>>>> Steve Piercy               Web Site Builder               Soquel, CA
>>>>>>>> <[hidden email]>                  <http://www.StevePiercy.com/>
>>>>>>>> --
>>>>>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>>>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>>>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>>>
>>>>>>
>>>>>
>>>>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>>>> Steve Piercy               Web Site Builder               Soquel, CA
>>>>> <[hidden email]>                  <http://www.StevePiercy.com/>
>>>>>
>>>>>
>>>>> --
>>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>
>>>>
>>>
>>>
>>> --
>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>
>>>
>>>
>>
>>
>> --
>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>
>>
>>
>
>
> --
> This list is a free service of LassoSoft: http://www.LassoSoft.com/
> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
> Manage your subscription: http://www.ListSearch.com/Lasso/
>
>
>



--
tagSwap.net :: Open Source Lasso Code
<http://tagSwap.net/>

--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


12