Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

Try this,

var pictureName = PicName1.substring(PicName1.lastIndexOf('/') + 1);

In your case it will return "PhotoName1.jpg"

Look this threadLook this thread

Try this,

var pictureName = PicName1.substring(PicName1.lastIndexOf('/') + 1);

In your case it will return "PhotoName1.jpg"

Look this thread

Try this,

var pictureName = PicName1.substring(PicName1.lastIndexOf('/') + 1);

In your case it will return "PhotoName1.jpg"

Look this thread

Source Link
SP Developer
  • 3.1k
  • 1
  • 18
  • 44

Try this,

var pictureName = PicName1.substring(PicName1.lastIndexOf('/') + 1);

In your case it will return "PhotoName1.jpg"

Look this thread