Get size of file requested via ajax

前端 未结 3 1380
心在旅途
心在旅途 2020-12-03 07:54

Here\'s what I\'m hoping to do:

I want to send an ajax request to a file (preferably with jQuery), and once the file has been loaded, determine the size of the reque

3条回答
  •  天涯浪人
    2020-12-03 08:41

    You could create a server-side command that takes the path and name of the file, opens the file to get the length, and sends the size back to the client. How you do it would depend on what server-side language you're using. Is that the type of action you're looking for?

提交回复
热议问题