Upload file on server with Amber

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Upload file on server with Amber

XumuK
Greetings!
I need to upload file from computer to server (something like upload file 'test.txt' in '$amber_path/projects/myProject/files').
Does anybody knows how i can do this?
Reply | Threaded
Open this post in threaded view
|

Re: Upload file on server with Amber

xekoukou
I am experimenting right now myself but if I understood you correctly, the server needs to respond to a put request. The server that is provided with amber does just that. Check amber/server/. The server has a method that 
saves data to files. It is used to commit your changes when you develop your code.

What I do to develop the server side of the code is load it to the browser, use the browser environment to work with the code and after I finish, i use amberc to create a js that can be used by nodejs.

So, if you want to see the server code, just create a js and st folder and put an index.html on the server folder.

2012/6/19 XumuK [via Smalltalk] <[hidden email]>
Greetings!
I need to upload file from computer to server (something like upload file 'test.txt' in '$amber_path/projects/myProject/files').
Does anybody knows how i can do this?



If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/Upload-file-on-server-with-Amber-tp4635555.html
To start a new topic under Amber Smalltalk, email [hidden email]
To unsubscribe from Amber Smalltalk, click here.
NAML



--

Sincerely yours, 
     Apostolis Xekoukoulotakis

Reply | Threaded
Open this post in threaded view
|

Re: Upload file on server with Amber

Nicolas Petton
In reply to this post by XumuK
XumuK <[hidden email]> writes:

Hi!

What are you using on the server-side?

Cheers,
Nico

> Greetings!
>
> I need to upload file from computer to server (something like upload
> file 'test.txt' in '$amber_path/projects/myProject/files').
> Does anybody knows how i can do this?

--
Nicolas Petton
http://nicolas-petton.fr
Reply | Threaded
Open this post in threaded view
|

Re: Upload file on server with Amber

XumuK
In reply to this post by XumuK
I run my amber server by following command: (in amber dir) sudo node ./server/server.js

Reply | Threaded
Open this post in threaded view
|

Re: Upload file on server with Amber

xekoukou
In reply to this post by XumuK

If I understood you correctly, the server needs to respond to a put request. The server that is provided with amber does just that. Check amber/server/. The server has a method that 
saves data to files. It is used to commit your changes when you develop your code.

What I do to develop the server side of the code is load it to the browser, use the browser environment to work with the code and after I finish, i use amberc to create a js that can be used by nodejs.

So, if you want to see the server code, just create a js and st folder and put an index.html on the server folder.


On Tuesday, June 19, 2012 10:20:10 PM UTC+3, XumuK wrote:
Greetings!
I need to upload file from computer to server (something like upload file 'test.txt' in '$amber_path/projects/myProject/files').
Does anybody knows how i can do this?
Reply | Threaded
Open this post in threaded view
|

Re: Upload file on server with Amber

XumuK
So, if i need to use functions declared in server.js, can i copy it to my project directory, for example 'myProhect/lib' and then use it from there?


среда, 20 июня 2012 г., 12:40:44 UTC+4 пользователь Apostolis Xekoukoulotakis написал:

If I understood you correctly, the server needs to respond to a put request. The server that is provided with amber does just that. Check amber/server/. The server has a method that 
saves data to files. It is used to commit your changes when you develop your code.

What I do to develop the server side of the code is load it to the browser, use the browser environment to work with the code and after I finish, i use amberc to create a js that can be used by nodejs.

So, if you want to see the server code, just create a js and st folder and put an index.html on the server folder.


On Tuesday, June 19, 2012 10:20:10 PM UTC+3, XumuK wrote:
Greetings!
I need to upload file from computer to server (something like upload file 'test.txt' in '$amber_path/projects/myProject/files').
Does anybody knows how i can do this?
Reply | Threaded
Open this post in threaded view
|

Re: Upload file on server with Amber

xekoukou
If you are developing the client code, you simply use the server that already exists. ie you do nothing more that execute /bin/server.
 

2012/6/20 XumuK <[hidden email]>
So, if i need to use functions declared in server.js, can i copy it to my project directory, for example 'myProhect/lib' and then use it from there?


среда, 20 июня 2012 г., 12:40:44 UTC+4 пользователь Apostolis Xekoukoulotakis написал:

If I understood you correctly, the server needs to respond to a put request. The server that is provided with amber does just that. Check amber/server/. The server has a method that 
saves data to files. It is used to commit your changes when you develop your code.

What I do to develop the server side of the code is load it to the browser, use the browser environment to work with the code and after I finish, i use amberc to create a js that can be used by nodejs.

So, if you want to see the server code, just create a js and st folder and put an index.html on the server folder.


On Tuesday, June 19, 2012 10:20:10 PM UTC+3, XumuK wrote:
Greetings!
I need to upload file from computer to server (something like upload file 'test.txt' in '$amber_path/projects/myProject/files').
Does anybody knows how i can do this?



--

Sincerely yours, 
     Apostolis Xekoukoulotakis